lighthouse_client/spawn/
tokio.rs

1use futures::Future;
2use tokio::task;
3
4use crate::Spawner;
5
6/// A spawner that creates asynchronous tasks.
7pub enum TokioSpawner {}
8
9impl Spawner for TokioSpawner {
10    fn spawn<F>(future: F) where F: Future + Send + 'static, F::Output: Send {
11        task::spawn(future);
12    }
13}