[prev in list] [next in list] [prev in thread] [next in thread]
List: gambas-devel
Subject: Re: Re: [Gambas-devel] About Watching and Wait()
From: danielcampos () netcourrier ! com
Date: 2003-10-29 8:35:42
[Download RAW message or body]
>I must implement the same thing in the interpreter, so that you can watch file
>descriptors AND call the WAIT instruction without using the QT component.
>
>I will do that as soon as possible, so that it is in the next version.
---------------------------------
OK, l'll "Wait" a little :)
------------------------------------
>Only ONE component can implement the event loop, i.e. the watch and the wait
>hooks. So the last loaded component implementing them wins.
>
>This event loop is the ONLY one function that can block the interpreter by
>calling select(). So your networking component, for example, must not call
>accept() directly for example. It must instead watch the socket file
>descriptor by calling GB.Watch(), return to the event loop, and call accept()
>at the beginning of the watch callback.
>
>It seems that you already did the good thing in your code :-)
>
>But I see that you raised an event into a callback : never do that ! Because
>it can lead to infinite loops. The event can call a gambas event handler that
>may return raise the same callback. You must use instead GB.Post() to post a
>function that will be call at the return of the event loop.
------------------------------------
I'll implement it on next version on "networking" component.
Thanks for you reply!
Regards,
Daniel Campos
-------------------------------------------------------------
NetCourrier, votre bureau virtuel sur Internet : Mail, Agenda, Clubs, Toolbar...
Web/Wap : www.netcourrier.com
Téléphone/Fax : 08 92 69 00 21 (0,34 € TTC/min)
Minitel: 3615 NETCOURRIER (0,16 € TTC/min)
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Gambas-devel mailing list
Gambas-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic