From f356b2bd5e3d46eaf4147a38a2f7c7e7c2824fbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sun, 17 Nov 2019 14:14:50 +0100 Subject: refactor: fixes for futures (#3363) After landing #3358 the benchmarks exploded indicating problems with workers and deno_core_http_bench. This PR dramatically fixes thread/syscall count that showed up on benchmarks. Thread count is not back to previous levels but difference went from hundreds/thousands to about ~50. --- cli/ops/workers.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cli/ops') diff --git a/cli/ops/workers.rs b/cli/ops/workers.rs index ee60c6824..42f93ec57 100644 --- a/cli/ops/workers.rs +++ b/cli/ops/workers.rs @@ -271,7 +271,8 @@ fn op_host_post_message( let mut table = state.workers.lock().unwrap(); // TODO: don't return bad resource anymore let worker = table.get_mut(&id).ok_or_else(bad_resource)?; - tokio_util::block_on(worker.post_message(msg).boxed()) + worker + .post_message(msg) .map_err(|e| DenoError::new(ErrorKind::Other, e.to_string()))?; Ok(JsonOp::Sync(json!({}))) } -- cgit v1.2.3