Re: [whatwg/streams] Permitting transferable stream optimisation (#1124)

The spec says [transferable streams](https://streams.spec.whatwg.org/#transferrable-streams) are: _"a special kind of identity transform which has the [writable side](https://streams.spec.whatwg.org/#writable-side) in one [realm](https://tc39.es/ecma262/#sec-code-realms) and the [readable side](https://streams.spec.whatwg.org/#readable-side) in another realm … to implement ... **cross-realm transforms**."_

IOW only one side is transferred, to create tunnels _between_ threads on purpose, NOT to solve streams being created on the wrong thread in the first place.

> Maybe the solution is simply to declare that a specific set of platform streams are "fully detachable" and standardise their behaviour explicitly?

I think that's what it would take, since the semantics are different. But I wouldn't standardize a new concept here.

MSTP/MTSG is creating these streams on the wrong thread. An alternative API is being proposed in https://github.com/w3c/mediacapture-transform/issues/59 that instead takes advantage of [transferable MediaStreamTrack](https://w3c.github.io/mediacapture-extensions/#transferable-mediastreamtrack), which would let us close this.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/1124#issuecomment-939057128

Received on Friday, 8 October 2021 19:07:20 UTC