5808: Make RacyFlag actually work
 r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2020-08-18 21:51:29 +00:00 committed by GitHub
commit 2a58adf4d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 {