top | item 40726998

(no title)

pdubouilh | 1 year ago

Pretty good write up - I reached the same conclusion doing something similar a few years back.

For the record, I got even better perfs with shared-memory by avoiding the mutex in `raw_sync::events::BusyEvent` - I used a blocking loop with atomics, and yielded the CPU (`yield_now` in rust) between the iterations of the loop.

Downside is that it becomes a bit less consistent. And it is a _lot_ more complex than a unix domain socket :)

discuss

order

SloopJon|1 year ago

After looking up the code for raw_sync, I came to the same conclusion. My first question was whether the shared memory case is safe on a weaker memory model like ARM or Power. Seeing the mutex, it may be too safe.