Registry / async / tokio-threadpool

tokio-threadpool

JSON →
library0.1.18rscratesunverified

A task scheduler backed by a work-stealing thread pool

# Cargo.toml [dependencies] tokio-threadpool = "0.1.18"
INSTALL
IMPORT
SIG · TOKIO-THREADPOOL
T
tokio-threadpool
asyncrustv0.1.18
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.

ThreadPool
use tokio_threadpool::ThreadPool;

Create and use a work-stealing thread pool

use tokio_threadpool::ThreadPool; use futures::future::lazy; fn main() { let pool = ThreadPool::new(); pool.spawn(lazy(|| { println!("Hello from thread pool"); Ok(()) })); pool.shutdown().wait().unwrap(); }
Debug
Known issues
breakingDeprecated in favor of `tokio::runtime`
fix
Use `tokio::runtime::Runtime` or `tokio::task::spawn_blocking`
affects: >=0.2.0
Upgrade
Version history
0.1.18latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
31 hits · last 30 days
node
26
OpenAI (training)
1
Resources
tokio-threadpool — cargo add tokio-threadpool · libregistry