fixed type error, yay!
This commit is contained in:
parent
912624a132
commit
ebf0a89406
@ -19,7 +19,7 @@ fn main() {
|
|||||||
let stream = stream.unwrap();
|
let stream = stream.unwrap();
|
||||||
let counter = Arc::clone(&counter);
|
let counter = Arc::clone(&counter);
|
||||||
|
|
||||||
tasks.queue(move || {
|
tasks.run(move || {
|
||||||
{
|
{
|
||||||
// in a subscope to release borrow automatically
|
// in a subscope to release borrow automatically
|
||||||
let mut count = counter.lock().unwrap();
|
let mut count = counter.lock().unwrap();
|
||||||
|
@ -12,7 +12,7 @@ impl<F: FnOnce()> FnBox for F {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type Job = Box<dyn FnOnce() + Send + 'static>;
|
type Job = Box<dyn FnBox + Send + 'static>;
|
||||||
|
|
||||||
struct Worker {
|
struct Worker {
|
||||||
id: usize,
|
id: usize,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user