mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
feat: support SharedArrayBuffer sharing between workers (#11040)
This commit adds support for sharing SABs between workers.
This commit is contained in:
parent
672a88f272
commit
bdfad23dd0
13 changed files with 152 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue