mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: integrate Boxed TaskSpawner (#1356)
This commit is contained in:
@ -66,7 +66,7 @@ pub mod shutdown;
|
||||
/// ```
|
||||
///
|
||||
/// The [TaskSpawner] trait is [DynClone] so `Box<dyn TaskSpawner>` are also `Clone`.
|
||||
pub trait TaskSpawner: Send + Sync + DynClone {
|
||||
pub trait TaskSpawner: Send + Sync + std::fmt::Debug + DynClone {
|
||||
/// Spawns the task onto the runtime.
|
||||
/// See also [`Handle::spawn`].
|
||||
fn spawn(&self, fut: BoxFuture<'static, ()>) -> JoinHandle<()>;
|
||||
|
||||
Reference in New Issue
Block a user