diff options
Diffstat (limited to 'runtime/worker.rs')
-rw-r--r-- | runtime/worker.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/worker.rs b/runtime/worker.rs index c8c93d2f0..f7287cfbb 100644 --- a/runtime/worker.rs +++ b/runtime/worker.rs @@ -72,6 +72,7 @@ pub struct WorkerOptions { pub blob_store: BlobStore, pub broadcast_channel: InMemoryBroadcastChannel, pub shared_array_buffer_store: Option<SharedArrayBufferStore>, + pub cpu_count: usize, } impl MainWorker { @@ -178,6 +179,7 @@ impl MainWorker { "unstableFlag": options.unstable, "v8Version": deno_core::v8_version(), "location": options.location, + "cpuCount": options.cpu_count, }); let script = format!( @@ -309,6 +311,7 @@ mod tests { blob_store: BlobStore::default(), broadcast_channel: InMemoryBroadcastChannel::default(), shared_array_buffer_store: None, + cpu_count: 1, }; MainWorker::from_options(main_module, permissions, &options) |