[REBOL] Re: using awake?
From: g:santilli:tiscalinet:it at: 15-Jun-2002 15:22
On Saturday, June 15, 2002, 2:18:39 PM, you wrote:
VN> so i want to use port/awake to process a tcp-request and respond a result.
VN> and not to stop the do-events.
VN> would this work, and how do i use 'awake?
Yes, it will. You need to add your port to system/ports/wait-list
so that it is waited for by DO-EVENTS. Then, you need to write an
port/awake: func [port /local data] [
; there's something in port
; with no-wait you could:
while [not empty? data: copy port] [prin data]
; you should return TRUE or FALSE
; TRUE: the WAIT function should return
; FALSE: continue waiting
This is almost all.
Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer
Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r