Registry / async / tokio-sync

tokio-sync

JSON →
library0.1.8rscratesunverified

Synchronization utilities for asynchronous programming with Tokio.

# Cargo.toml [dependencies] tokio-sync = "0.1.8"
INSTALL
IMPORT
SIG · TOKIO-SYNC
T
tokio-sync
asyncrustv0.1.8
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.

Mutex
use tokio::sync::Mutex;

Uses Tokio's async Mutex to safely mutate shared state.

use tokio::sync::Mutex; use std::sync::Arc; #[tokio::main] async fn main() { let data = Arc::new(Mutex::new(0)); let mut lock = data.lock().await; *lock += 1; println!("Value: {}", *lock); }
Debug
Known issues
breakingThis crate is deprecated; functionality is now part of the `tokio` crate itself.
fix
Use `tokio::sync` instead of `tokio-sync`.
affects: >=0.2.0
Upgrade
Version history
0.1.8latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
33 hits · last 30 days
node
28
Bingbot
1
OpenAI (training)
1
Resources
tokio-sync — cargo add tokio-sync · libregistry