Grzegorz,

you asked on Wed, 24 Mar 2004 12:32:32 +0100:
In other words I would like to use the queue and occurence with one while
loop. Desired effect is that while loop waits for one of these events
(element in queue or occurence).
In my case, dequeue function was being blocked by the wait occurence
function.
andBoth of these sync functions provide a timeout functionality and a timed-out? result. You may set this timeout to a short value (maybe even 0) decode the queue value only if an element has been received (e.g. the call did not time-out). If you put the remainder of your code into a case that is run just if at least one of your syncs did not time out you are done.
So in pseudocode:
Your While loop
<Your code part 1>
'Dequeue elemet' with timeout=1
if not timeoutqueue decode queue data
'wait on occurence' with timeout=1
Case (not timeoutqueue or not timeoutoccurrence
<your code part 2>
EndCase
EndWhile


Hope this helps!
Greetings from (neighbouring) Germany!
--
Uwe Frenz


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Dr. Uwe Frenz Entwicklung getemed Medizin- und Informationtechnik AG Oderstr. 59 D-14513 Teltow

Tel.  +49 3328 39 42 0
Fax   +49 3328 39 42 99
[EMAIL PROTECTED]
WWW.Getemed.de




Reply via email to