summaryrefslogtreecommitdiff
path: root/cli/compilers/ts.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/compilers/ts.rs')
-rw-r--r--cli/compilers/ts.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/cli/compilers/ts.rs b/cli/compilers/ts.rs
index 9bfd93eeb..dec74c256 100644
--- a/cli/compilers/ts.rs
+++ b/cli/compilers/ts.rs
@@ -9,12 +9,11 @@ use crate::file_fetcher::SourceFile;
use crate::file_fetcher::SourceFileFetcher;
use crate::global_state::GlobalState;
use crate::msg;
-use crate::ops::worker_host::run_worker_loop;
use crate::ops::JsonResult;
use crate::source_maps::SourceMapGetter;
use crate::startup_data;
use crate::state::*;
-use crate::tokio_util::create_basic_runtime;
+use crate::tokio_util;
use crate::version;
use crate::worker::WorkerEvent;
use crate::worker::WorkerHandle;
@@ -611,11 +610,10 @@ async fn execute_in_thread(
let builder =
std::thread::Builder::new().name("deno-ts-compiler".to_string());
let join_handle = builder.spawn(move || {
- let mut worker = TsCompiler::setup_worker(global_state.clone());
+ let worker = TsCompiler::setup_worker(global_state.clone());
handle_sender.send(Ok(worker.thread_safe_handle())).unwrap();
drop(handle_sender);
- let mut rt = create_basic_runtime();
- run_worker_loop(&mut rt, &mut worker).expect("Panic in event loop");
+ tokio_util::run_basic(worker).expect("Panic in event loop");
})?;
let mut handle = handle_receiver.recv().unwrap()?;
handle.post_message(req).await?;