From 17d6efe6f20732a1508acd014ff9582c05ebaa05 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 18 Aug 2020 23:51:01 +0200 Subject: Make RacyFlag actually work --- crates/stdx/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates') 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); impl RacyFlag { pub const fn new() -> RacyFlag { - RacyFlag(AtomicUsize::new(0)) + RacyFlag(AtomicUsize::new(!0)) } pub fn get(&self, init: impl FnMut() -> bool) -> bool { -- cgit v1.2.3