[−][src]Crate blackhole
Blackhole
...to throw your threads into.
Project
- Repository: https://bitbucket.org/haibison/blackhole-rs
- License: Free Public License 1.0.0
- This project follows Semantic Versioning 2.0.0
Features
- Simple thread manager.
- Threads' panics are printed to stderr.
- TODO
Design
It uses a channel and 2 threads:
- Manager: holds jobs in a queue.
- Runner: constantly contacts manager to ask for new jobs to run.
Examples
use blackhole::Blackhole; let active_limit: u64 = 10; let queue_limit: usize = 1_000; let blackhole = Blackhole::new(active_limit, queue_limit).unwrap(); for i in 0..20 { blackhole.throw(move || { println!("i = {:02}", i); }); } blackhole.escape_on_idle().unwrap();
Structs
Blackhole | Blackhole |
Constants
CODE_NAME | Crate code name |
NAME | Crate name |
RELEASE_DATE | Crate release date (year/month/day) |
TAG | Tag, which can be used for logging... |
UUID | Unique universally identifier of this crate |
VERSION | Crate version |