From 7ba94c1b30410131e582ee168a6893e2fcd0c605 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Mon, 30 Oct 2023 19:42:02 -0700 Subject: [PATCH] enable compat_worker interop with real workers --- src/compat_worker.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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),