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. -- 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 racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/20210126070556.7f%40sirmail.smtps.cs.utah.edu.