Registry / async / scoped-threadpool

scoped-threadpool

JSON →
library0.1.9rscratesunverified

A library for scoped and cached threadpools in Rust.

# Cargo.toml [dependencies] scoped_threadpool = "0.1.9"
INSTALL
IMPORT
SIG · SCOPED-THREADPOOL
S
scoped-threadpool
asyncrustv0.1.9
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.

Pool
use scoped_threadpool::Pool;

Create a scoped threadpool and execute tasks.

use scoped_threadpool::Pool; fn main() { let mut pool = Pool::new(4); pool.scoped(|scope| { for _ in 0..8 { scope.execute(|| { println!("Hello from a scoped thread!"); }); } }); }
Debug
Known issues
gotchaThe `scoped` method borrows the pool mutably, preventing concurrent scoped calls.
fix
Ensure only one scoped block is active at a time; consider using separate pools for parallelism.
affects: >=0.1.0
Upgrade
Version history
0.1.9latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
25 hits · last 30 days
node
22
Amazon
1
OpenAI (training)
1
Resources
scoped-threadpool — cargo add scoped-threadpool · libregistry