diff options
Diffstat (limited to 'core/src/async_runtime')
-rw-r--r-- | core/src/async_runtime/executor.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/src/async_runtime/executor.rs b/core/src/async_runtime/executor.rs index 9335f12..88f6370 100644 --- a/core/src/async_runtime/executor.rs +++ b/core/src/async_runtime/executor.rs @@ -25,6 +25,11 @@ impl Executor { ) -> Task<T> { self.inner.spawn(future).into() } + + #[cfg(feature = "tokio")] + pub fn handle(&self) -> &tokio::runtime::Handle { + return self.inner.handle(); + } } static GLOBAL_EXECUTOR: OnceCell<Executor> = OnceCell::new(); |