diff --git a/src/bin/main.rs b/src/bin/main.rs index 41dcbe4..cca9b38 100644 --- a/src/bin/main.rs +++ b/src/bin/main.rs @@ -19,7 +19,7 @@ fn main() { let stream = stream.unwrap(); let counter = Arc::clone(&counter); - tasks.queue(move || { + tasks.run(move || { { // in a subscope to release borrow automatically let mut count = counter.lock().unwrap(); diff --git a/src/lib.rs b/src/lib.rs index c16aabc..afa3087 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,7 +12,7 @@ impl FnBox for F { } } -type Job = Box; +type Job = Box; struct Worker { id: usize,