[REBOL] Re: Async Callback
From: gabriele:colellachiara at: 19-Nov-2004 12:44
Hi Charles,
On Thursday, November 18, 2004, 8:22:31 PM, you wrote:
WC> I would like to be able to do some processing while waiting for the NEXT
WC> request. If possible, where would I put that code?
The short answer is that it is not possible, since if you are
doing any processing, you are not receiving events.
However, what you can do is doing a bit of processing, then
waiting a bit for events, then doing another bit of processing,
and so on. In this case, you'd need a loop, because you want to
exit from the WAIT every so often so that you can do your bit of
processing.
For example:
forever [
wait 0 ; this does not actually wait, but allows the
; processing of events that have already happened
; if you don't want to be processing all the time,
; you might want to wait more.
do-some-processing ; here you should do a little step of
; processing; while you are doing this,
; you are *NOT* processing events, so this
; step should be as quick as possible.
]
Regards,
Gabriele.
--
Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer
Amiga Group Italia sez. L'Aquila --- SOON: http://www.rebol.it/