pub type QNWorker<'a,Task>=CompatNWorker<'a,Task>;
pub type INWorker<'a,Task>=CompatNWorker<'a,Task>;

pub struct CompatNWorker<'a,Task>{
	f:Box<dyn FnMut(Task)+Send+'a>,
}

impl<'a,Task> CompatNWorker<'a,Task>{
	pub fn new(f:impl FnMut(Task)+Send+'a)->CompatNWorker<'a,Task>{
		Self{
			f:Box::new(f),
		}
	}

	pub fn send(&mut self,task:Task)->Result<(),()>{
		(self.f)(task);
		Ok(())
	}
}
