Registry / async / async-scoped

async-scoped

JSON →
library0.9.0rscratesunverified

Spawns scoped (non-'static) asynchronous futures for async_std and tokio runtimes.

# Cargo.toml [dependencies] async-scoped = "0.9.0"
INSTALL
IMPORT
SIG · ASYNC-SCOPED
A
async-scoped
asyncrustv0.9.0
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.

TokioScope
use async_scoped::TokioScope;

Spawns a scoped async task using Tokio.

use async_scoped::TokioScope; fn main() { let result = TokioScope::scope_and_block(|s| { s.spawn(async { 42 }); }); println!("{:?}", result); }
Debug
Known issues
gotchaRequires either tokio or async-std runtime to be active.
fix
Ensure you have a tokio or async-std runtime set up before using this crate.
affects: >=0.9.0
Upgrade
Version history
0.9.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
35 hits · last 30 days
node
30
Resources
async-scoped — cargo add async-scoped · libregistry