atomic_waker.rs
SHA-256c681bd2ac777245e88655c260a5475e2b51685c6e5c10f035718be07411d23a9
Malecule∅
Evidence
1:40… nc")), allow(dead_code, unreachable_pub))]
2
3use crate::loom::cell::UnsafeCell;
4use crate::loom::sync::atomic::{self, AtomicUsize};
5
6use std::fmt;
7use std::sync::atomic::Ordering::{AcqRel, Acquire, Release};
8use std::task::Waker;
9
10/// A synchronization primitive for task waking.
11///
12/// `AtomicWaker` will coordinate concurrent wakes with the consumer
13/// potentially "waking" the underlying task. This is useful in scenarios
14/// where a computation completes in another thread and wants to wake the
15/// consumer, but the consumer is in the process of being migrated to a new
16/ …
39:34… get stored in the cell. The losers will not
40// have their tasks woken. As such, callers should ensure to add synchronization
41// to calls to `regist …
43:73… cess to
44// the `Waker` cell. There are two bits that are operated on independently. These
45// are represented by `REGISTERING` and `WAKING`.
46//
47// Th …