Crates.io | std-threadpool |
lib.rs | std-threadpool |
version | 0.1.0 |
source | src |
created_at | 2024-01-06 03:34:47.014877 |
updated_at | 2024-01-06 03:34:47.014877 |
description | Threadpool implementation |
homepage | |
repository | https://github.com/Logan-010/std-threadpool |
max_upload_size | |
id | 1090723 |
size | 4,973 |
Basic thread pool implementation using some code from the rust book.
Basic usage:
//create a new thread pool with the specified number of threads
let workers: ThreadPool = ThreadPool::new(4);
//execute a closure from the thread pool
workers.execute(|| {
println!("Hello from a worker thread!");
}).unwrap();