summaryrefslogtreecommitdiff
path: root/src/node_internals.h
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2018-08-01 21:50:45 +0200
committerAnna Henningsen <anna@addaleax.net>2018-08-09 02:11:55 +0200
commite3bae655839ea7f0019f7e6bd33fe941a5f6be62 (patch)
tree96184a8376eec20f3f52faa16b35a64d285ea3f6 /src/node_internals.h
parentfcb46a462635361daa922e9b38a1b7dbda461c8a (diff)
downloadandroid-node-v8-e3bae655839ea7f0019f7e6bd33fe941a5f6be62.tar.gz
android-node-v8-e3bae655839ea7f0019f7e6bd33fe941a5f6be62.tar.bz2
android-node-v8-e3bae655839ea7f0019f7e6bd33fe941a5f6be62.zip
worker: fix deadlock when calling terminate from exit handler
Just before we call the `'exit'` handlers of a Worker, we drain the public port’s message queue to ensure proper ordering. Previously, we held the Worker’s `mutex_` during the exit handler call, so calling `terminate()` on the worker could lead to a deadlock if called from one of those message handlers. This fixes flakiness in the `parallel/test-worker-dns-terminate` test. PR-URL: https://github.com/nodejs/node/pull/22073 Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_internals.h')
0 files changed, 0 insertions, 0 deletions