[racket-dev] request: replace-evt

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Jul 15 10:46:26 EDT 2014

Added!

At Tue, 8 Jul 2014 05:36:55 +0100, Matthew Flatt wrote:
> Hi Jan,
> 
> That's a nice idea. Something similar --- but in a restricted form ---
> is used internally to implement various primitive events. I think I see
> how to generalize it to work with more arbitrary events and non-atomic
> replace functions.
> 
> There could easily be a catch that I'm overlooking, but I'll give it a
> try.
> 
> Matthew
> 
> At Mon, 07 Jul 2014 22:41:55 +0200, Jan Dvořák wrote:
> > Hi,
> > 
> > I would like to humbly request a new `replace-evt` procedure that would
> > work as `wrap-evt` except that when it produces another `evt?`, `sync`
> > replaces the old event with the newly produced one and restarts.
> > 
> > It will be a good replacement for threads and channels when filtering
> > events or addition of bookkeeping handlers is desired.
> > 
> > I peeked at the syncing code and it seems doable, but the code is too
> > dense for me to grok it. :-(
> > 
> > What do you think?
> > 
> > Best regards,
> > Jan Dvorak
> > 
> > 
> > _________________________
> >   Racket Developers list:
> >   http://lists.racket-lang.org/dev
> 
> _________________________
>   Racket Developers list:
>   http://lists.racket-lang.org/dev


Posted on the dev mailing list.