diff options
| author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-10-11 13:20:40 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-11 13:20:40 +0200 |
| commit | 527628e186e0fcaf946cc0668c36453eac8ad8ae (patch) | |
| tree | 73398451ec23455552884af2a260bd6f50fa1090 /cli/ops | |
| parent | 7af5041a0677b9f201a98d383a852c4515744fdc (diff) | |
reland JsRuntime/Worker is not a Future (#7924)
Diffstat (limited to 'cli/ops')
| -rw-r--r-- | cli/ops/worker_host.rs | 4 |
1 files changed, 3 insertions, 1 deletions
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); })?; |
