summaryrefslogtreecommitdiff
path: root/cli/main.rs
diff options
context:
space:
mode:
authorLuca Casonato <hello@lcas.dev>2021-07-06 19:42:52 +0200
committerGitHub <noreply@github.com>2021-07-06 19:42:52 +0200
commitbdfad23dd012d0c3226b466544e86109da18d09c (patch)
treef59bfc463f29047df80c48abbe299e55a16b8622 /cli/main.rs
parent672a88f2727286233ab904e23a9145aa5563a834 (diff)
feat: support SharedArrayBuffer sharing between workers (#11040)
This commit adds support for sharing SABs between workers.
Diffstat (limited to 'cli/main.rs')
-rw-r--r--cli/main.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/cli/main.rs b/cli/main.rs
index a61f94530..eb7b4d333 100644
--- a/cli/main.rs
+++ b/cli/main.rs
@@ -123,6 +123,9 @@ fn create_web_worker_callback(
get_error_class_fn: Some(&crate::errors::get_error_class_name),
blob_store: program_state.blob_store.clone(),
broadcast_channel: program_state.broadcast_channel.clone(),
+ shared_array_buffer_store: Some(
+ program_state.shared_array_buffer_store.clone(),
+ ),
};
let (mut worker, external_handle) = WebWorker::from_options(
@@ -209,6 +212,9 @@ pub fn create_main_worker(
}),
blob_store: program_state.blob_store.clone(),
broadcast_channel: program_state.broadcast_channel.clone(),
+ shared_array_buffer_store: Some(
+ program_state.shared_array_buffer_store.clone(),
+ ),
};
let mut worker = MainWorker::from_options(main_module, permissions, &options);