-
Notifications
You must be signed in to change notification settings - Fork 28
Add alternate implementations of synchronization primitives #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks! Could you add tests for |
|
I added a basic spsc test for Loom, but I keep bumping my head on this panic: I'm not that familiar with loom, but is there a way around this? If I have the receiver thread wait on a |
|
With some tinkering, I built a channel implementation with loom primitives based on |
taiki-e
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
- Could you add docs about
portable-atomicfeature? like atomic-waker's docs - I want to treat
loomas an unstable cfg so docs inlib.rsis probably not needed, but could you document that it is unstable in Cargo.toml? like crossbeam-utils's Cargo.toml
|
Thank you for taking the time to review, @taiki-e! I implemented the suggestions you made. The only real issue here is that running the CI now takes significantly longer. Even with |
This PR adds two alternate implementations of synchronization primitives:
loom. This can be enabled usingcfg(loom). Unfortunately there is no real way to test this, sinceloomtests require some kind of synchronization primitive to make progress.portable-atomic, enabled using theportable-atomicfeature. This allowsconcurrent-queueto be used on platforms without available atomics.Obsoletes #5