From d8879feb8c832dbb38649551b1cb0730874f7be6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 7 Oct 2020 22:30:06 +0200 Subject: refactor(core): JsRuntime is not a Future (#7855) This commit rewrites deno_core::JsRuntime to not implement Future trait. Instead there are two separate methods: - JsRuntime::poll_event_loop() - does single tick of event loop - JsRuntime::run_event_loop() - runs event loop to completion --- cli/worker.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli') diff --git a/cli/worker.rs b/cli/worker.rs index 488a2eeba..ea9362a6b 100644 --- a/cli/worker.rs +++ b/cli/worker.rs @@ -240,7 +240,7 @@ impl Future for Worker { // We always poll the inspector if it exists. let _ = inner.inspector.as_mut().map(|i| i.poll_unpin(cx)); inner.waker.register(cx.waker()); - inner.js_runtime.poll_unpin(cx) + inner.js_runtime.poll_event_loop(cx) } } -- cgit v1.2.3