[racket] how to tell if an event is ready for syncing?
On Jul 18, 2014, at 1:45 AM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> 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.
No, I meant without actually trying to sync.
> 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.
Ok thanks