Jump to content

Question of sleep()


dongaman
 Share

Recommended Posts

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.

Link to comment
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.
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...