[plt-scheme] value-based event?

From: YC (yinso.chen at gmail.com)
Date: Thu Jan 21 04:12:24 EST 2010

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...

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100121/fabe16d8/attachment.html>

Posted on the users mailing list.