Registry / async / async-task

async-task

JSON →
library4.7.1rscratesunverified

Task abstraction for building executors, providing a foundation for async runtimes.

# Cargo.toml [dependencies] async-task = "4.7.1"
INSTALL
IMPORT
SIG · ASYNC-TASK
A
async-task
asyncrustv4.7.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.

Task
use async_task::Task;

Spawn a blocking task and await its result.

use async_task::Task; fn main() { let task = Task::blocking(|| { // Some blocking work 42 }); let result = task.await; }
Debug
Known issues
gotchaRequires an async runtime to poll tasks.
fix
Use an executor like smol or tokio to run the task.
affects: >=4.0.0
Upgrade
Version history
4.7.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
54 hits · last 30 days
node
44
OpenAI (training)
1
Resources
async-task — cargo add async-task · libregistry