Expand description
Atomics which can be subscribed to and asynchronously notify when updated.
The main structure is AsyncAtomic
that behaves like stdlib’s atomics,
but don’t take an explicit Ordering
for simplicity.
A reference to AsyncAtomic
can asynchronously wait for updates using methods from AsyncAtomicRef
trait.
Note that if there are more than one future at the same time then only the most recently poll
ed future will be notified.
Older futures will never receive an update, so it’s up to user to ensure that only one of them .await
ing at a time.
Modules§
Structs§
- Async
Atomic - Atomic value that also contains
Waker
to notify subscriber asynchronously. - Changed
- Stream that yields value when it change.
- Wait
- Future to wait for specific value.
- Wait
AndUpdate - Future to wait and update an atomic value.
Traits§
- Async
Atomic Ref - Generic reference to async atomic.
- Atom
- Types that can be represented by a primitive type supporting atomic operations.