diff --git a/src/compat_worker.rs b/src/compat_worker.rs index d41ea3e..aec9367 100644 --- a/src/compat_worker.rs +++ b/src/compat_worker.rs @@ -3,11 +3,11 @@ pub type INWorker<'a,Task>=CompatNWorker<'a,Task>; pub struct CompatNWorker<'a,Task>{ data:std::marker::PhantomData, - f:Box, + f:Box, } impl<'a,Task> CompatNWorker<'a,Task>{ - pub fn new(f:impl FnMut(Task)+'a)->CompatNWorker<'a,Task>{ + pub fn new(f:impl FnMut(Task)+Send+'a)->CompatNWorker<'a,Task>{ Self{ data:std::marker::PhantomData, f:Box::new(f),