diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2020-10-10 05:41:11 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-10 11:41:11 +0200 |
commit | 08bb8b3d53eb2445de9b5e2845ab8acf9d353800 (patch) | |
tree | ebf00cb815ee1a10be00c74cbb332af33dd52dc2 /cli/ops/worker_host.rs | |
parent | 782e6a2ed5d76bb5a154c56d7daf4607e5bdb93f (diff) |
Fix 100% CPU idling problem by reverting #7672 (#7911)
* Revert "refactor: Worker is not a Future (#7895)"
This reverts commit f4357f0ff9d39411f22504fcc20db6bd5dec6ddb.
* Revert "refactor(core): JsRuntime is not a Future (#7855)"
This reverts commit d8879feb8c832dbb38649551b1cb0730874f7be6.
* Revert "fix(core): module execution with top level await (#7672)"
This reverts commit c7c767782538243ded64742dca9b34d6af74d62d.
Diffstat (limited to 'cli/ops/worker_host.rs')
-rw-r--r-- | cli/ops/worker_host.rs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/cli/ops/worker_host.rs b/cli/ops/worker_host.rs index 0b36e2c47..11529c686 100644 --- a/cli/ops/worker_host.rs +++ b/cli/ops/worker_host.rs @@ -155,13 +155,6 @@ fn run_worker_thread( if let Err(e) = result { let mut sender = worker.internal_channels.sender.clone(); - - // If sender is closed it means that worker has already been closed from - // within using "globalThis.close()" - if sender.is_closed() { - return; - } - sender .try_send(WorkerEvent::TerminalError(e)) .expect("Failed to post message to host"); @@ -173,8 +166,7 @@ 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.run_event_loop()) - .expect("Panic in event loop"); + rt.block_on(worker).expect("Panic in event loop"); debug!("Worker thread shuts down {}", &name); })?; |