[racket] how to tell if an event is ready for syncing?
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.