[Gambas-user] sleep vs waith in serial respect forms/class
T Lee Davidson
t.lee.davidson at gmail.com
Tue Aug 21 18:06:38 CEST 2018
On 08/21/2018 11:39 AM, PICCORO McKAY Lenz wrote:
> ahhhhhhh! as wiki said (wiki don load property in the ide, too much dealy) "waith" can be used inside event's, and sleep's
> cannot be used inside ?
It's the other way around. SLEEP can be used inside an event handler, and WAIT cannot.
> noted said "The event loop is not called during a sleep, and so events are not processed." so means that during the "sleep
> duration" no one event will be raised right?
Correct. If you need to wait for an event to be raised, then you need to use WAIT since that allows the event loop to occur.
But, as Jussi stated, WAIT cannot be used within and event handler. Doing so can lead to event collisions and undefined behavior
including program crash.
___
Lee
More information about the User
mailing list