Registry / async / local-sync

local-sync

JSON →
library0.1.1rscratesunverified

Non-threadsafe data structure for async usage

# Cargo.toml [dependencies] local-sync = "0.1.1"
INSTALL
IMPORT
SIG · LOCAL-SYNC
L
local-sync
asyncrustv0.1.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.

LocalOnceCell
use local_sync::LocalOnceCell;

Demonstrates a non-threadsafe once cell for async contexts

use local_sync::LocalOnceCell; fn main() { let cell = LocalOnceCell::new(); cell.set(42).unwrap(); assert_eq!(*cell.get().unwrap(), 42); }
Debug
Known issues
gotchaNot thread-safe; use only within a single thread or async executor
fix
Ensure the data structure is not shared across threads; use std::sync types for multi-threaded contexts
affects: >=0.1.0
Upgrade
Version history
0.1.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
24 hits · last 30 days
node
22
OpenAI (training)
1
Resources
local-sync — cargo add local-sync · libregistry