[racket] how to tell if an event is ready for syncing?

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Fri Jul 18 01:45:16 EDT 2014

At Thu, 17 Jul 2014 14:37:27 -0400, "Alexander D. Knauth" wrote:
> This seems like it should be a stupid question, but I can’t find anything in 
> the docs.  

Do you mean that you want to poll an event (i.e., try to synchronize,
but give up immediately if it's not ready)? Use `sync/timeout` with a 0
timeout for that.

Some events cannot be polled without committing to a communication. For
example, there's no way to check whether `sync` on a synchronous
channel would provide a value without accepting the value.



Posted on the users mailing list.