Complete Web Workers documentation about how to pass objects from main thread to Web worker

RESOLVED FIXED

Status

Developer Documentation
API: Web Workers
P5
normal
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: teoli, Unassigned)

Tracking

Details

(Reporter)

Description

3 years ago
:: Developer Documentation Request

      Request Type: Correction
     Gecko Version: Trunk
 Technical Contact: 

:: Details

Our documentation about how to transfer data between workers (or the main thread and workers) is far from complete.

Gaia developers don't find the info they need and their are perf caveats to put clear.

We need to:
* update Transferable (it is not an interface in the spec…)
* update ArrayBuffer and other transferable interfaces
* Create a "How to pass data to workers" page, with the different way and their benefits and inconvenient.
* Update Structure Clone Algorithm with info about when not to use it, and what perf is expected.
* Update https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/postMessage with info about all this (and a link to how to pass data to workers).

Then keep all this updated (more things will be able to be transferred in the future).
Also need to cover how to send data back from worker to main thread.
This has been handled by Chris and others in their work since taking over the Worker docs from me a few months ago.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.