Make RacyFlag actually work

This commit is contained in:
Aleksey Kladov 2020-08-18 23:51:01 +02:00
parent ca90d3cf22
commit 17d6efe6f2

View File

@ -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 {