Registry / async / arc-swap

arc-swap

JSON →
library1.9.1rscratesunverified

Atomically swappable Arc for lock-free concurrent data access.

# Cargo.toml [dependencies] arc-swap = "1.9.1"
INSTALL
IMPORT
SIG · ARC-SWAP
A
arc-swap
asyncrustv1.9.1
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.

ArcSwap
use arc_swap::ArcSwap;

Atomically swaps an Arc pointer, returning the old value.

use arc_swap::ArcSwap; use std::sync::Arc; fn main() { let data = ArcSwap::from(Arc::new(42)); let new_data = Arc::new(100); let old = data.swap(new_data); println!("Old value: {}", old); println!("Current value: {}", data.load()); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.9.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
62 hits · last 30 days
node
52
Meta
1
OpenAI (training)
1
Resources
arc-swap — cargo add arc-swap · libregistry