[Gambas-user] sleep vs waith in serial respect forms/class

PICCORO McKAY Lenz mckaygerhard at gmail.com
Tue Aug 21 18:43:13 CEST 2018


umm that means that the sleep instruction will "hang" the program during
that period/time! so may i have to use with caution!

thanks for all

Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com

2018-08-21 12:06 GMT-04:00 T Lee Davidson <t.lee.davidson at gmail.com>:

> 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
>
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180821/d2209c73/attachment.html>


More information about the User mailing list