# ice-threads [![travis-ci.com](https://img.shields.io/travis/com/purple-ice/ice-threads.svg?logo=Travis%20CI)](https://travis-ci.com/purple-ice/ice-threads) [![crates.io](https://img.shields.io/crates/v/ice-threads.svg?logo=Rust&logoColor=%23cd853f)](https://crates.io/crates/ice-threads) [![docs.rs](https://docs.rs/ice-threads/badge.svg)](https://docs.rs/crate/ice-threads) [![license](https://img.shields.io/crates/l/ice-threads.svg?colorB=%231874cd&logoColor=%23cccccc&logo=Read%20The%20Docs)](https://opensource.org/licenses/MIT) ice-threads is a lightweight Thread Pool (Melter) implementation. User can enqueue Tasks (Ice) to be executed. Optionally, user can return a value that can be collected through a special handle (Bottle) that is returned by the thread pool task enqueuing method. Tasks are put into the queue and eventually picked up by a task stealing thread (Heater) and executed. # Usage Put this in your `Cargo.toml`: ```toml [dependencies] ice-threads = "0.1" ``` Start melting your tasks: ```rust use ice_threads::Melter; fn main() { let melter = Melter::new(1); let s = melter.melt(|| { "Watch this task melt away!" }).open(); println!("{}", s); } ``` # Features * Very simple to use. * Very light crate with no dependencies. # Changelog ### v0.1.0 * Introduced `Melter` type (Thread Pool) * Introduced `Bottle` type ("Future")