diff --git a/runtime/worker.rs b/runtime/worker.rs index 0f95b816fd..5cfd30dd10 100644 --- a/runtime/worker.rs +++ b/runtime/worker.rs @@ -29,6 +29,8 @@ use std::env; use std::pin::Pin; use std::rc::Rc; use std::sync::Arc; +use std::task::Context; +use std::task::Poll; /// This worker is created and used by almost all /// subcommands in Deno executable. @@ -278,6 +280,14 @@ impl MainWorker { inspector.create_local_session() } + pub fn poll_event_loop( + &mut self, + cx: &mut Context, + wait_for_inspector: bool, + ) -> Poll> { + self.js_runtime.poll_event_loop(cx, wait_for_inspector) + } + pub async fn run_event_loop( &mut self, wait_for_inspector: bool,