-
Notifications
You must be signed in to change notification settings - Fork 341
feat: implement sync::Barrier #240
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
Based on the implementation in tokio-rs/tokio#1571
36af98a
to
b77b72d
Compare
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.
This patch looks good to me. I think we should accept this, and I'll file a follow-up PR to mark this as "unstable". The reason for that is that we're currently pulling in quite a few deps, and Stjepan hasn't had a chance to review the API here either (though I think we're okay).
To reduce the amount of deps we have to build I've also filed a patch against Broadcaster: leo60228/broadcaster#1.
Either way; this is fantastic work, thanks so much for putting the time in to build this!
It looks like it's Cargo that's failing CI on MacOS. All other tests' pass, so I think this should be fine. Let's see if Bors accepts this. bors r+ |
240: feat: implement sync::Barrier r=yoshuawuyts a=dignifiedquire ~~Based on the implementation in tokio-rs/tokio#1571 Based on the implementation in the std lib Things to discuss - `async` or `std` `Arc` in examples and tests - ~~`async` or `std` `Mutex` in the implementation~~ can't use std, as it needs to be shared - use of `broadcaster` dependency to implement, well broadcast To fix - [x] missing debug implementation, once broadcaster has it, or it is dropped ## Docs  Co-authored-by: dignifiedquire <dignifiedquire@users.noreply.github.com>
Build failed
|
bors r+ |
240: feat: implement sync::Barrier r=yoshuawuyts a=dignifiedquire ~~Based on the implementation in tokio-rs/tokio#1571 Based on the implementation in the std lib Things to discuss - `async` or `std` `Arc` in examples and tests - ~~`async` or `std` `Mutex` in the implementation~~ can't use std, as it needs to be shared - use of `broadcaster` dependency to implement, well broadcast To fix - [x] missing debug implementation, once broadcaster has it, or it is dropped ## Docs  Co-authored-by: dignifiedquire <dignifiedquire@users.noreply.github.com>
Build failed
|
Looks like on this nightly |
Based on the implementation in tokio-rs/tokio#1571Based on the implementation in the std lib
Things to discuss
async
orstd
Arc
in examples and testscan't use std, as it needs to be sharedasync
orstd
Mutex
in the implementationbroadcaster
dependency to implement, well broadcastTo fix
Docs