feat: declarative builder v2 (#6447)

Co-authored-by: Oliver Nordbjerg <onbjerg@users.noreply.github.com>
This commit is contained in:
Matthias Seitz
2024-02-13 23:51:38 +01:00
committed by GitHub
parent 11dbd0867e
commit cfc914669b
39 changed files with 2213 additions and 17 deletions

View File

@ -298,6 +298,12 @@ impl TaskExecutor {
&self.on_shutdown
}
/// Runs a future to completion on this Handle's associated Runtime.
#[track_caller]
pub fn block_on<F: Future>(&self, future: F) -> F::Output {
self.handle.block_on(future)
}
/// Spawns a future on the tokio runtime depending on the [TaskKind]
fn spawn_on_rt<F>(&self, fut: F, task_kind: TaskKind) -> JoinHandle<()>
where