pi_async_runtime/
current.rs1use crate::{instance::*, mode::RuntimeMode};
3use pi_async_executor::{ExecutorClock, ExecutorHooks, IdlePolicy};
4use pi_async_runtime_core::RuntimeContext;
5use pi_clock_manual::global::GlobalManualInstant;
6impl<C: ExecutorClock<Instant = GlobalManualInstant>> RuntimeContext for RuntimeHandle<C> {
7 type Handle = Self;
8 fn handle(&self) -> Self {
9 self.clone()
10 }
11}
12impl<M, C, P, H> RuntimeContext for ConfiguredRuntime<M, C, P, H>
13where
14 M: RuntimeMode,
15 C: ExecutorClock<Instant = GlobalManualInstant>,
16 P: IdlePolicy,
17 H: ExecutorHooks,
18{
19 type Handle = RuntimeHandle<C>;
20 fn handle(&self) -> RuntimeHandle<C> {
21 self.shared.clone()
22 }
23}