async_rt/arc.rs
1use crate::{Executor, JoinHandle};
2use std::future::Future;
3use std::sync::Arc;
4
5impl<E> Executor for Arc<E>
6where
7 E: Executor,
8{
9 fn spawn<F>(&self, future: F) -> JoinHandle<F::Output>
10 where
11 F: Future + Send + 'static,
12 F::Output: Send + 'static,
13 {
14 (**self).spawn(future)
15 }
16}