Sign in to follow this  
Followers 0
dongaman

Question of sleep()

7 posts in this topic

That may be complicated, sorry my poor nonnative english :D

I build a GUI app with many functions.And i set GUIOnEventMode to 1.In the main gui,I use while(1)and sleep(1000) to loop the gui.

My QUESTION is: Wether any other function i will be paused or to be unstable while the dead loop in main gui sleeping?

BECAUSE:

1 The function i defined have some while(1) loop to receive console application's output.

2 The console app is child app created from my main gui app.

Share this post


Link to post
Share on other sites



Share this post


Link to post
Share on other sites

But I found nothing about sleep's 'bad smell' in autoit help doc.

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

'bad smell' means influence.

I used this c++ terms :D

Share this post


Link to post
Share on other sites

'bad smell' means influence.

I used this c++ terms :

Oh, I see :D. Sleep in the main loop can't interfere with your functions as AutoIt is a single-threaded language (@usual suspects: bash me for wrong wording :D, pllleeeease :huggles:). When you call a function via OnEvent the single main thread's working on that function and will never call the main loop until the function returns.

Share this post


Link to post
Share on other sites

ok, I hope so :D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0