From 83818c914b6bd3e0d9323117b760f08d13d295e7 Mon Sep 17 00:00:00 2001 From: cuobiezi Date: Tue, 12 Jul 2022 01:02:23 +0800 Subject: refactor: rename run_basic to run_local (#15068) --- runtime/tokio_util.rs | 3 +-- runtime/web_worker.rs | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'runtime') 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(future: F) -> R +pub fn run_local(future: F) -> R where F: std::future::Future, { 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) } -- cgit v1.2.3