aboutsummaryrefslogtreecommitdiffstats
path: root/components/util/taskpool.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/util/taskpool.rs')
-rw-r--r--components/util/taskpool.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/util/taskpool.rs b/components/util/taskpool.rs
index ff70bc4c1c0..064b2c9c07e 100644
--- a/components/util/taskpool.rs
+++ b/components/util/taskpool.rs
@@ -44,7 +44,7 @@ impl TaskPool {
loop {
let job = rx.lock().unwrap().recv();
match job {
- Ok(job) => job.invoke(()),
+ Ok(job) => job.call_box(()),
Err(..) => break,
}
}
@@ -54,6 +54,6 @@ impl TaskPool {
pub fn execute<F>(&self, job: F)
where F: FnOnce() + Send + 'static
{
- self.tx.send(Thunk::new(job)).unwrap();
+ self.tx.send(Box::new(job)).unwrap();
}
}