[racket-dev] Motivation for handle-evt/wrap-evt contracts
I think the issue is that the tail guarantee can't be met if there are two
handles (one won't be in tail position wrt to the sync).
Robby
On Thu, Jul 25, 2013 at 12:48 PM, Asumu Takikawa <asumu at ccs.neu.edu> wrote:
> Hi all,
>
> I had a question about `handle-evt` and synchronizable events in
> general. I was trying to understand the documentation and only have a
> partial idea of the motivation behind `handle-evt` and the contracts of
> `handle-evt` and `wrap-evt`.
>
> In particular, what is the motivation for disallowing objects that
> satisfy `handle-evt?` as an argument for `handle-evt` and `wrap-evt`?
>
> As far as I understand, `handle-evt` allows more efficient
> post-processing of a synchronization result because the handler is
> called in tail position. However, it doesn't seem necessary to disallow
> the addition of more handlers (with the caveat that the tail call
> guarantee will disappear if this happens).
>
> Am I missing something?
>
> Note: I'm asking because these restrictions in the contracts complicate
> the types that we need to assign in Typed Racket:
> https://github.com/plt/racket/pull/379
>
> Cheers,
> Asumu
> _________________________
> Racket Developers list:
> http://lists.racket-lang.org/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20130725/0d4b49d1/attachment.html>