worker: allow synchronously draining message ports by addaleax · Pull Request #26686 · nodejs/node

@addaleax

In combination with Atomics, this makes it possible to implement
generic synchronous functionality, e.g. `importScript()`, in Workers
purely by communicating with other threads.

@addaleax added semver-minor

PRs that contain new features and should be released in the next minor version.

worker

Issues and PRs related to Worker support.

labels

Mar 15, 2019

JungMinu

ZYSzys

@addaleax addaleax deleted the message-port-sync-drain branch

April 17, 2019 23:01

addaleax added a commit to addaleax/node that referenced this pull request

May 19, 2019
In combination with Atomics, this makes it possible to implement
generic synchronous functionality, e.g. `importScript()`, in Workers
purely by communicating with other threads.

This is a continuation of nodejs#26686,
where a preference for a solution was voiced that allowed reading
individual messages, rather than emitting all messages through events.

addaleax added a commit that referenced this pull request

May 19, 2019
In combination with Atomics, this makes it possible to implement
generic synchronous functionality, e.g. `importScript()`, in Workers
purely by communicating with other threads.

This is a continuation of #26686,
where a preference for a solution was voiced that allowed reading
individual messages, rather than emitting all messages through events.

PR-URL: #27294
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>

targos pushed a commit that referenced this pull request

May 20, 2019
In combination with Atomics, this makes it possible to implement
generic synchronous functionality, e.g. `importScript()`, in Workers
purely by communicating with other threads.

This is a continuation of #26686,
where a preference for a solution was voiced that allowed reading
individual messages, rather than emitting all messages through events.

PR-URL: #27294
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>