Przeglądaj źródła

Add functions

master
Noelle 4 lat temu
rodzic
commit
be682e952e
1 zmienionych plików z 9 dodań i 1 usunięć
  1. 9
    1
      src/lib.rs

+ 9
- 1
src/lib.rs Wyświetl plik

pub struct ThreadPool; pub struct ThreadPool;


impl ThreadPool { impl ThreadPool {
pub fn new(size: usize) -> ThreadPool {
assert!(size > 0);
ThreadPool
}

pub fn execute<F>(&self, f: F)
where F: FnOnce() + Send + 'static {

}
} }

Ładowanie…
Anuluj
Zapisz