aboutsummaryrefslogtreecommitdiff
path: root/crates/stdx
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-08-18 22:51:01 +0100
committerAleksey Kladov <[email protected]>2020-08-18 22:51:01 +0100
commit17d6efe6f20732a1508acd014ff9582c05ebaa05 (patch)
treee9535f18129847b57abd07df1e1dd7f8d8fedc8e /crates/stdx
parentca90d3cf22762cccdd02f82dd8782c072d95f485 (diff)
Make RacyFlag actually work
Diffstat (limited to 'crates/stdx')
-rw-r--r--crates/stdx/src/lib.rs2
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
142impl RacyFlag { 142impl 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 {