ice-threads 0.1.0

Lightweight Thread pool implementation.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::Meltable;



pub(crate) struct Ice(Box<Meltable + Send + 'static>);

impl Ice {
    pub fn new<I>(ice: I) -> Ice
    where
        I: FnOnce() + Send + 'static {
        Ice(Box::new(ice))
    }

    pub fn melt(self) {
        self.0.melt();
    }
}