summaryrefslogtreecommitdiff
path: root/cli/worker.rs
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2019-06-11 14:35:03 -0400
committerGitHub <noreply@github.com>2019-06-11 14:35:03 -0400
commitde8c85f8f2f4631cc4e7cba2616df94fd2c37160 (patch)
tree9055aa499839093145083cc54ca6ffe312e5c13d /cli/worker.rs
parent508e9849ffd1491b8f3ac9aaaad507e84f57fed3 (diff)
Move Modules to ThreadSafeState (#2498)
Diffstat (limited to 'cli/worker.rs')
-rw-r--r--cli/worker.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/cli/worker.rs b/cli/worker.rs
index 99470c2a7..aff461a94 100644
--- a/cli/worker.rs
+++ b/cli/worker.rs
@@ -19,7 +19,6 @@ use url::Url;
#[derive(Clone)]
pub struct Worker {
inner: Arc<Mutex<deno::Isolate>>,
- pub modules: Arc<Mutex<deno::Modules>>,
pub state: ThreadSafeState,
}
@@ -36,7 +35,6 @@ impl Worker {
});
Self {
inner: Arc::new(Mutex::new(deno::Isolate::new(startup_data, config))),
- modules: Arc::new(Mutex::new(deno::Modules::new())),
state,
}
}
@@ -67,7 +65,7 @@ impl Worker {
let worker_ = worker.clone();
let loader = self.state.clone();
let isolate = self.inner.clone();
- let modules = self.modules.clone();
+ let modules = self.state.modules.clone();
let recursive_load =
deno::RecursiveLoad::new(js_url.as_str(), loader, isolate, modules);
recursive_load