1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -05:00

leave in poll_event_loop

This commit is contained in:
Ryan Dahl 2021-09-24 16:38:10 -04:00
parent b7acdbf619
commit 8923f6cb10

View file

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