Re: [whatwg/streams] can streams be transferred via postMessage()? (#276)

Yea, that is exactly the problem i had, I'm impressed that you manage to reproduce my problem i had with just one little code snippet and not using any service worker or iframes

But yea! The solution you mention is kinda what I'm doing right now. I'm creating a MessageChannel and passing the stream throught it instead to get a more direct A to B direction.

Is that what you must do? 

> When the worker is terminated, it closes its side of both MessageChannels, breaking the chain between the original stream and the re-transferred one.

Is it intendent to closes both sides?

> A better solution would be for the worker to re-use the internal MessagePort that was used to transfer the original stream.

Is that something that might change for allowing it to happen? should it "un-pipe" when re-transferring? or simply put it "re-use the internal `MessagePort`" 


-- 
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/276#issuecomment-482939077

Received on Sunday, 14 April 2019 09:48:56 UTC