diff options
Diffstat (limited to 'runtime/worker.rs')
-rw-r--r-- | runtime/worker.rs | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/runtime/worker.rs b/runtime/worker.rs index e83c8a720..c60e189f7 100644 --- a/runtime/worker.rs +++ b/runtime/worker.rs @@ -1,6 +1,5 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -use std::pin::Pin; use std::rc::Rc; use std::sync::atomic::AtomicI32; use std::sync::atomic::Ordering::Relaxed; @@ -15,7 +14,6 @@ use deno_cache::SqliteBackedCache; use deno_core::ascii_str; use deno_core::error::AnyError; use deno_core::error::JsError; -use deno_core::futures::Future; use deno_core::merge_op_metrics; use deno_core::v8; use deno_core::CompiledWasmModuleStore; @@ -615,24 +613,6 @@ impl MainWorker { self.js_runtime.run_event_loop(wait_for_inspector).await } - /// A utility function that runs provided future concurrently with the event loop. - /// - /// Useful when using a local inspector session. - pub async fn with_event_loop<'a, T>( - &mut self, - mut fut: Pin<Box<dyn Future<Output = T> + 'a>>, - ) -> T { - loop { - tokio::select! { - biased; - result = &mut fut => { - return result; - } - _ = self.run_event_loop(false) => {} - }; - } - } - /// Return exit code set by the executed code (either in main worker /// or one of child web workers). pub fn exit_code(&self) -> i32 { |