Commit 331f604
worker: drain messages from internal message port
When the worker thread exits, drain the messages also from the internal
message port so that the call to 'kDispose' will occur only after all
the messages from the worker were processed in the parent, so stdio
messages from the worker will be successfully pushed to their target
streams in the parent.
PR-URL: #24932
Fixes: #24636
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>1 parent f854701 commit 331f604Copy full SHA for 331f604
File tree
Expand file treeCollapse file tree
2 files changed
+42
-0
lines changedOpen diff view settings
Filter options
- lib/internal
- test/parallel
Expand file treeCollapse file tree
2 files changed
+42
-0
lines changedOpen diff view settings
Collapse file
+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
317 | 317 | |
318 | 318 | |
319 | 319 | |
| 320 | + |
320 | 321 | |
321 | 322 | |
322 | 323 | |
|
Collapse file
test/parallel/test-worker-message-port-drain.js
Copy file name to clipboard+41Lines changed: 41 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
0 commit comments