[plt-scheme] value-based event?
Hi all -
is it possible to create an event based on whether a variable has value - if
it is #f, then the event blocks, and when the event gets set to something
else other than #f, the event unblocks?
Something like:
(define x #f)
(thread (lambda ()
(sleep 10)
(set! x 1)))
(sync (has-value-evt x)) ;; unblock when (set! x 1) is reached...
Thanks,
yc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100121/fabe16d8/attachment.html>