Issue metadata
Sign in to add a comment
|
SharedArrayBuffer should be sendable via MessagePort or BroadcastChannel |
||||||||||||||||||||
Issue descriptionSending SharedArrayBuffers via MessagePort or BroadcastChannel currently fails. The desired behavior is that the message is successfully created on the receiver and dispatched to the onmessage handler, or the message cannot be created and a message is dispatched to onmessageerror. The tricky part is that the pointer to the SharedArrayBuffer contents is stashed on the SerializedScriptValue, but that is stripped when sending via MessagePort/BroadcastChannel when the message is converted to a wire format. It seems likely that we'll need to have a per-process SharedArrayBuffer registry where we can store a mapping from id -> SharedArrayBuffer contents.
,
Aug 4 2017
Are there any news in regards to this issue?
,
Aug 8 2017
@2: Not currently, are you depending on this feature somewhere?
,
Aug 9 2017
I need to transfer a Sharedarraybuffer from one Worker to another. They are already connected via a MessagePort. But it is not that much important since there is a workaround.
,
Oct 27 2017
I'd love to know what the workaround alluded to here is? I'm currently trying to pass a SharedArrayBuffer between two workers via a MessageChannel and cannot figure out a way round this problem. I'm currently having to duplicate the data everywhere instead, which is killing performance.
,
Oct 27 2017
I implemented a message routing through the regular channels. In my case: I send the SharedArrayBuffer with an unique id to the main window (which owns all the workers) which will send it to all workers in need of it. after that i send a message over the MessageChannel and only refference the SharedArrayBuffer using the id.
,
Oct 27 2017
Ah thank you! That is a neat workaround :)
,
Jun 13 2018
Passing SharedArrayBuffer over message port works now, this was implemented in some of the CLs referenced in this bug: https://bugs.chromium.org/p/chromium/issues/detail?id=716320 Since these bugs are very similar, duping this one to that bug. |
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by binji@chromium.org
, May 4 2017