mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 15:54:15 +00:00
Make RacyFlag actually work
This commit is contained in:
parent
ca90d3cf22
commit
17d6efe6f2
@ -141,7 +141,7 @@ pub struct RacyFlag(AtomicUsize);
|
||||
|
||||
impl RacyFlag {
|
||||
pub const fn new() -> RacyFlag {
|
||||
RacyFlag(AtomicUsize::new(0))
|
||||
RacyFlag(AtomicUsize::new(!0))
|
||||
}
|
||||
|
||||
pub fn get(&self, init: impl FnMut() -> bool) -> bool {
|
||||
|
Loading…
Reference in New Issue
Block a user