-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Make Barrier::new()
const
#119536
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
Make Barrier::new()
const
#119536
Conversation
r? @thomcc (rustbot has picked a reviewer for you, use r? to override) |
Seems fine to me but needs libs-api. r? libs-api |
@rust-lang/libs-api: This enables using std::sync::Barrier in use std::sync::Barrier;
use std::thread;
use std::time::Duration;
static BARRIER: Barrier = Barrier::new(3);
fn main() {
loop {
thread::spawn(|| {
BARRIER.wait();
println!("{:?}", thread::current().id());
});
thread::sleep(Duration::from_millis(300));
}
} |
Team member @dtolnay has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. This will be merged soon. |
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.
Thank you!
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (8f359be): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 650.231s -> 648.482s (-0.27%) |
I guess this was just missed in #97791?
@rustbot label T-libs-api -T-libs