diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/tokio_util.rs | 3 | ||||
-rw-r--r-- | runtime/web_worker.rs | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/runtime/tokio_util.rs b/runtime/tokio_util.rs index 25693ae55..52888abe4 100644 --- a/runtime/tokio_util.rs +++ b/runtime/tokio_util.rs @@ -14,8 +14,7 @@ pub fn create_basic_runtime() -> tokio::runtime::Runtime { .unwrap() } -// TODO(ry) rename to run_local ? -pub fn run_basic<F, R>(future: F) -> R +pub fn run_local<F, R>(future: F) -> R where F: std::future::Future<Output = R>, { diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs index ba2c016cc..83ba380a6 100644 --- a/runtime/web_worker.rs +++ b/runtime/web_worker.rs @@ -5,7 +5,7 @@ use crate::js; use crate::ops; use crate::ops::io::Stdio; use crate::permissions::Permissions; -use crate::tokio_util::run_basic; +use crate::tokio_util::run_local; use crate::worker::FormatJsErrorFn; use crate::BootstrapOptions; use deno_broadcast_channel::InMemoryBroadcastChannel; @@ -733,5 +733,5 @@ pub fn run_web_worker( debug!("Worker thread shuts down {}", &name); result }; - run_basic(fut) + run_local(fut) } |