summaryrefslogtreecommitdiff
path: root/cli/main.rs
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2021-07-30 01:15:11 +0530
committerGitHub <noreply@github.com>2021-07-29 21:45:11 +0200
commit2b13bb694532904704c16bec4e8a47c386e681e2 (patch)
tree0021131ce86873a5aa965d79b99185b3ca5c5aff /cli/main.rs
parenteece46f0d85faa90c97841a4f409be39272e809b (diff)
feat(runtime): implement navigator.hardwareConcurrency (#11448)
This commit implements "navigator.hardwareConcurrency" API, which supersedes "Deno.systemCpuInfo()" API (which was removed in this commit).
Diffstat (limited to 'cli/main.rs')
-rw-r--r--cli/main.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/cli/main.rs b/cli/main.rs
index bb7e03041..52f2c55af 100644
--- a/cli/main.rs
+++ b/cli/main.rs
@@ -126,6 +126,7 @@ fn create_web_worker_callback(
shared_array_buffer_store: Some(
program_state.shared_array_buffer_store.clone(),
),
+ cpu_count: num_cpus::get(),
};
let (mut worker, external_handle) = WebWorker::from_options(
@@ -215,6 +216,7 @@ pub fn create_main_worker(
shared_array_buffer_store: Some(
program_state.shared_array_buffer_store.clone(),
),
+ cpu_count: num_cpus::get(),
};
let mut worker = MainWorker::from_options(main_module, permissions, &options);