Registry / async / atomic-waker

atomic-waker

JSON →
library1.1.2rscratesunverified

A synchronization primitive for task wakeup in async contexts.

# Cargo.toml [dependencies] atomic-waker = "1.1.2"
INSTALL
IMPORT
SIG · ATOMIC-WAKER
A
atomic-waker
asyncrustv1.1.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AtomicWaker
✓ use atomic_waker::AtomicWaker;

Registers a waker and wakes it from another thread.

use atomic_waker::AtomicWaker; use std::sync::Arc; use std::thread; let waker = Arc::new(AtomicWaker::new()); let waker_clone = waker.clone(); thread::spawn(move || { waker_clone.wake(); }); waker.register();
Debug
Known issues
gotchaMust be used with a proper async runtime to avoid panics.
fix
Ensure you are within an async context when calling register.
affects: >=1.0.0
Upgrade
Version history
1.1.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
54 hits · last 30 days
node
44
Anthropic
1
Resources
atomic-waker — cargo add atomic-waker · libregistry