Registry / async / threadpool

threadpool

JSON →
library1.8.1rscratesunverified

A thread pool for running a number of jobs on a fixed set of worker threads.

# Cargo.toml [dependencies] threadpool = "1.8.1"
INSTALL
IMPORT
SIG · THREADPOOL
T
threadpool
asyncrustv1.8.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.

ThreadPool
use threadpool::ThreadPool;

Creates a thread pool with 4 workers and executes 8 jobs.

use threadpool::ThreadPool; let pool = ThreadPool::new(4); for _ in 0..8 { pool.execute(|| { println!("Hello from a thread!"); }); } pool.join();
Debug
Known issues
gotchaJobs are executed on separate threads; ensure closures are Send + 'static.
fix
Use move closures or Arc for shared data.
affects: >=1.0.0
Upgrade
Version history
1.8.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
44 hits · last 30 days
node
40
OpenAI (training)
1
Resources
threadpool — cargo add threadpool · libregistry