From 8923f6cb1023f1a6f55bf5629b7da1ab504b98ef Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Fri, 24 Sep 2021 16:38:10 -0400 Subject: [PATCH] leave in poll_event_loop --- runtime/worker.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) 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,