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

I think "the tunnel closes when either side ceases to exist" is the semantics we want.
The question is where the two sides live in the case where one is sourced from a non-main-thread source and the other one is transferred from main-thread to a worker. I'd argue that the "other end" of that tunnel lives in the source, not in the main-thread.

In the case where both ends are transferred into different contexts, it would seem a bit odd if the lifetime of the tunnel depends on the place of creation, which is no longer involved in the transfer.

(But as mentioned before, this concern doesn't apply to streams sourced off cameras; the camera will die when the owning context does, even if its stream generation is done off-thread.)

-- 
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-832259713

Received on Tuesday, 4 May 2021 21:27:30 UTC