diff options
author | Anna Henningsen <anna@addaleax.net> | 2019-02-01 02:18:51 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2020-05-20 13:37:25 +0300 |
commit | d2a6f06dce724d24b0aa3c7a2821e4757002bffc (patch) | |
tree | 6d91f468eaa1c4226de4f0340386b621846e6a4b /lib/internal/main | |
parent | 6961c7f804cad26b471d5f7c4c92b0861ba19f12 (diff) |
worker: use _writev in internal communication
PR-URL: https://github.com/nodejs/node/pull/33454
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'lib/internal/main')
-rw-r--r-- | lib/internal/main/worker_thread.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/internal/main/worker_thread.js b/lib/internal/main/worker_thread.js index 3b7a2ef873f..ecf5d00c440 100644 --- a/lib/internal/main/worker_thread.js +++ b/lib/internal/main/worker_thread.js @@ -167,8 +167,9 @@ port.on('message', (message) => { CJSLoader.Module.runMain(filename); } } else if (message.type === STDIO_PAYLOAD) { - const { stream, chunk, encoding } = message; - process[stream].push(chunk, encoding); + const { stream, chunks } = message; + for (const { chunk, encoding } of chunks) + process[stream].push(chunk, encoding); } else { assert( message.type === STDIO_WANTS_MORE_DATA, |