From 335e8bd33cd22891f12b58c4d9489d19c886ae4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sat, 9 Nov 2019 21:07:14 +0100 Subject: refactor: worker is no longer a resource (#3290) --- cli/compilers/ts.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'cli/compilers') diff --git a/cli/compilers/ts.rs b/cli/compilers/ts.rs index 854963eaa..327b3fbeb 100644 --- a/cli/compilers/ts.rs +++ b/cli/compilers/ts.rs @@ -223,8 +223,10 @@ impl TsCompiler { /// Create a new V8 worker with snapshot of TS compiler and setup compiler's runtime. fn setup_worker(global_state: ThreadSafeGlobalState) -> Worker { - let worker_state = ThreadSafeState::new(global_state.clone(), None, true) - .expect("Unable to create worker state"); + let (int, ext) = ThreadSafeState::create_channels(); + let worker_state = + ThreadSafeState::new(global_state.clone(), None, true, int) + .expect("Unable to create worker state"); // Count how many times we start the compiler worker. global_state @@ -236,6 +238,7 @@ impl TsCompiler { "TS".to_string(), startup_data::compiler_isolate_init(), worker_state, + ext, ); worker.execute("denoMain()").unwrap(); worker.execute("workerMain()").unwrap(); -- cgit v1.2.3