diff --git a/tokio-executor/src/global.rs b/tokio-executor/src/global.rs index ab4d526dc..8b5a47198 100644 --- a/tokio-executor/src/global.rs +++ b/tokio-executor/src/global.rs @@ -79,6 +79,20 @@ impl super::Executor for DefaultExecutor { } }) } + + fn status(&self) -> Result<(), SpawnError> { + EXECUTOR.with(|current_executor| { + match current_executor.get() { + Some(executor) => { + let executor = unsafe { &mut *executor }; + executor.status() + } + None => { + Err(SpawnError::shutdown()) + } + } + }) + } } // ===== global spawn fns =====