summaryrefslogtreecommitdiff
path: root/runtime/web_worker.rs
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2021-10-21 13:05:43 +0200
committerBert Belder <bertbelder@gmail.com>2021-11-08 12:49:11 -0800
commitf1b1a3f389827af8983a78680c066fdad337ae32 (patch)
tree7eaaac2b3094d40bc9fa4a453988ad7ddb4f37cd /runtime/web_worker.rs
parentb0426979029fe1923def25462f9b36b51c1263ec (diff)
refactor: move `mod tokio_util` to runtime (#12332)
This avoids a bunch of duplicated code.
Diffstat (limited to 'runtime/web_worker.rs')
-rw-r--r--runtime/web_worker.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs
index c70d20ffc..c7358bc74 100644
--- a/runtime/web_worker.rs
+++ b/runtime/web_worker.rs
@@ -4,7 +4,7 @@ use crate::inspector_server::InspectorServer;
use crate::js;
use crate::ops;
use crate::permissions::Permissions;
-use crate::tokio_util::create_basic_runtime;
+use crate::tokio_util::run_basic;
use crate::BootstrapOptions;
use deno_broadcast_channel::InMemoryBroadcastChannel;
use deno_core::error::AnyError;
@@ -545,8 +545,6 @@ pub fn run_web_worker(
) -> Result<(), AnyError> {
let name = worker.name.to_string();
- let rt = create_basic_runtime();
-
// TODO(bartlomieju): run following block using "select!"
// with terminate
@@ -587,6 +585,5 @@ pub fn run_web_worker(
debug!("Worker thread shuts down {}", &name);
result
};
-
- rt.block_on(fut)
+ run_basic(fut)
}