Streams API: transferable streams
The streams APIs provide ubiquitous, interoperable primitives for creating, composing, and consuming streams of data. A natural thing to do with a stream is to pass it to a web worker. This provides a fluent primitive for offloading work to another thread. Transferable streams add this capability by allowing ReadableStream, WritableStream, and TransformStream objects to be passed as arguments to postMessage().
Offloading work onto a worker is important for a smooth user experience, but the ergonomics can be awkward. Transferable streams solve this problem for streams. Once the stream itself has been transferred, the data is transparently cloned in the background.
Status in Chromium
Enabled by default (tracking bug) in:
- Chrome for desktop release 87
- Chrome for Android release 87
Consensus & Standardization
Intent to Prototype urlIntent to Prototype thread
Last updated on 2020-10-28