Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: using awake?

From: g:santilli:tiscalinet:it at: 15-Jun-2002 15:22

Hi Volker, 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 handler: 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 false ] This is almost all. Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r