diff options
author | Aleksey Kladov <[email protected]> | 2020-08-18 22:51:01 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-08-18 22:51:01 +0100 |
commit | 17d6efe6f20732a1508acd014ff9582c05ebaa05 (patch) | |
tree | e9535f18129847b57abd07df1e1dd7f8d8fedc8e /crates | |
parent | ca90d3cf22762cccdd02f82dd8782c072d95f485 (diff) |
Make RacyFlag actually work
Diffstat (limited to 'crates')
-rw-r--r-- | crates/stdx/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/stdx/src/lib.rs b/crates/stdx/src/lib.rs index 5d60f0219..273b0f55b 100644 --- a/crates/stdx/src/lib.rs +++ b/crates/stdx/src/lib.rs | |||
@@ -141,7 +141,7 @@ pub struct RacyFlag(AtomicUsize); | |||
141 | 141 | ||
142 | impl RacyFlag { | 142 | impl RacyFlag { |
143 | pub const fn new() -> RacyFlag { | 143 | pub const fn new() -> RacyFlag { |
144 | RacyFlag(AtomicUsize::new(0)) | 144 | RacyFlag(AtomicUsize::new(!0)) |
145 | } | 145 | } |
146 | 146 | ||
147 | pub fn get(&self, init: impl FnMut() -> bool) -> bool { | 147 | pub fn get(&self, init: impl FnMut() -> bool) -> bool { |