On Mon, 11 Nov 2013, PICCORO McKAY Lenz wrote: > From: Tobias Boege <tabo...@gmail.com> > > On Mon, 11 Nov 2013, PICCORO McKAY Lenz wrote: > >> From: Tobias Boege <tabo...@gmail.com> > >> > Sleep puts the program to sleep - literally. It just waits for a given > >> > time > >> > to elapse and then resumes execution. > >> all programs inherint and parent? !! ok thnks for clarification! but > >> some details more: > > > sorry for my very bad english Tobias, i hate that languaje, u clarify > me very well the usage.. but in one simple question, its same for a > gambas program console without gui? > > in gui projects, there's a main threat running, and wait do not stop > that, but in console there's no main threath , u got it?! >
Ahh. Actually, there is no "main thread" or something. Gambas is single- threaded throughout. In GUI programs, the so-called "event loop" kicks in automatically because you have windows open. See the docs[0]. You can also force the event loop to run by putting While True Wait 2 ^ 30 Wend before your Main() ends. This will call the event loop forever without being too busy in the loop. So your program will not terminate except when you use Quit or something. BTW: Gambas is a nice language. You cannot make threats with it :-) Threads are also not possible in Gambas currently. (You should look up the word "threat" in a dictionary.) The closest thing you can have is "Task" but I've no experience with this. Regards, Tobi [0] http://gambasdoc.org/help/cat/eventloop?v3 ------------------------------------------------------------------------------ November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable programming models. Explore techniques for threading, error checking, porting, and tuning. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user