From 527628e186e0fcaf946cc0668c36453eac8ad8ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sun, 11 Oct 2020 13:20:40 +0200 Subject: reland JsRuntime/Worker is not a Future (#7924) --- cli/ops/worker_host.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cli/ops') diff --git a/cli/ops/worker_host.rs b/cli/ops/worker_host.rs index 11529c686..5de15f153 100644 --- a/cli/ops/worker_host.rs +++ b/cli/ops/worker_host.rs @@ -155,6 +155,7 @@ fn run_worker_thread( if let Err(e) = result { let mut sender = worker.internal_channels.sender.clone(); + sender .try_send(WorkerEvent::TerminalError(e)) .expect("Failed to post message to host"); @@ -166,7 +167,8 @@ fn run_worker_thread( // TODO(bartlomieju): this thread should return result of event loop // that means that we should store JoinHandle to thread to ensure // that it actually terminates. - rt.block_on(worker).expect("Panic in event loop"); + rt.block_on(worker.run_event_loop()) + .expect("Panic in event loop"); debug!("Worker thread shuts down {}", &name); })?; -- cgit v1.2.3