diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-08-18 22:51:29 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-08-18 22:51:29 +0100 |
commit | 2a58adf4d36e04d71be96674e2ba52ee1b150d32 (patch) | |
tree | e9535f18129847b57abd07df1e1dd7f8d8fedc8e /crates | |
parent | ca90d3cf22762cccdd02f82dd8782c072d95f485 (diff) | |
parent | 17d6efe6f20732a1508acd014ff9582c05ebaa05 (diff) |
Merge #5808
5808: Make RacyFlag actually work
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
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 { |