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 --- core/examples/http_bench_bin_ops.rs | 2 +- core/examples/http_bench_json_ops.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'core/examples') diff --git a/core/examples/http_bench_bin_ops.rs b/core/examples/http_bench_bin_ops.rs index 8d612f146..7335b8670 100644 --- a/core/examples/http_bench_bin_ops.rs +++ b/core/examples/http_bench_bin_ops.rs @@ -260,7 +260,7 @@ fn main() { include_str!("http_bench_bin_ops.js"), ) .unwrap(); - js_runtime.await + js_runtime.run_event_loop().await }; runtime.block_on(future).unwrap(); } diff --git a/core/examples/http_bench_json_ops.rs b/core/examples/http_bench_json_ops.rs index 106b96f36..2cf3d09e3 100644 --- a/core/examples/http_bench_json_ops.rs +++ b/core/examples/http_bench_json_ops.rs @@ -193,7 +193,7 @@ fn main() { include_str!("http_bench_json_ops.js"), ) .unwrap(); - js_runtime.await + js_runtime.run_event_loop().await }; runtime.block_on(future).unwrap(); } -- cgit v1.2.3