We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
get_runtime_handle()
1 parent 544701c commit 5a27c8bCopy full SHA for 5a27c8b
src/lib.rs
@@ -454,7 +454,8 @@ impl<T: futures_io::AsyncSeek> tokio::io::AsyncSeek for Compat<T> {
454
}
455
456
457
-fn get_runtime_handle() -> tokio::runtime::Handle {
+/// Return a handle to the current runtime, or the fallback runtime, if any.
458
+pub fn get_runtime_handle() -> tokio::runtime::Handle {
459
tokio::runtime::Handle::try_current().unwrap_or_else(|_| TOKIO1.handle().clone())
460
461
0 commit comments