On Tue, Jan 26, 2021 at 3:06 PM Matthew Flatt <[email protected]> wrote:

> At Tue, 26 Jan 2021 14:49:22 +0100, Ryan Culpepper wrote:
> > Thanks for the pointer! Those sound useful, but in the spirit of maximum
> > caution, is there a guarantee that the write to the box from the new OS
> > thread will be visible to the original Racket OS thread when the poller
> > tries to read it? Is `box-cas!` or one of the memory-order operations
> > needed?
>
> I think enough synchronization is implied by `(signal-received)` and
> the way it interacts with the scheduler. That is, there's no guarantee
> that the waiting thread sees a box change right away, but signaling the
> waiting thread will imply a barrier on both the signaling side and
> waiting side, so that the next poll iteration after receiving the
> signal will definitely see the update at the latest. If that sounds
> right, we could make that a guarantee for signaling and polling.
>

That sounds reasonable. Thanks!

Ryan

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CANy33q%3DETxYur_5VNFmdROjqg69u_gRWgqwmNq%3DW5cFQKnEOPQ%40mail.gmail.com.

Reply via email to