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

2011-10-22 Thread Tony Garnock-Jones
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 t

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

2011-10-22 Thread Matthew Flatt
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'. At Sat, 22 Oct 2011 10:24:27 -0400, Tony Garnock-Jones wrote: > On 2011-10-22 9:43 AM, T

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

2011-10-22 Thread Tony Garnock-Jones
On 2011-10-22 9:43 AM, Tony Garnock-Jones wrote: > Nothing like the 20 seconds or so after a post to make one question > oneself. Could it be that semaphore-peek-evt could be used to get what I > need? I'll experiment. The answer is "almost", i.e. "no". But scheme_sema_post_all doesn't do what I w