Spawn on borrowed ThreadPool
@@ -101,6 +101,15 @@ impl ThreadPool {
}
impl Spawn for ThreadPool {
+ fn spawn_obj(
+ &mut self,
+ future: FutureObj<'static, ()>,
+ ) -> Result<(), SpawnError> {
+ (&*self).spawn_obj(future)
+ }
+}
+
+impl Spawn for &ThreadPool {
fn spawn_obj(
&mut self,
future: FutureObj<'static, ()>,
