[racket-dev] Kill-safe, single-write, blocking box (was Re: scheme_sema_post_all)

From: Tony Garnock-Jones (tonyg at ccs.neu.edu)
Date: Sat Oct 22 11:44:27 EDT 2011

On 2011-10-22 11:42 AM, Matthew Flatt wrote:
> I think you could get this behavior by creating a manager thread when
> you create the new kind of box. If threads are too heavyweight, though,
> you can get the effect of a primitive by using `ffi/unsafe/atomic'.

Of course! Using a thread to manage the cell is straightforward and will
obviously work. I guess my imagination failed me indeed!

Thanks for the pointer to ffi/unsafe/atomic. I'll see if something
interesting can be done with that, as well.


Posted on the dev mailing list.