Skip to content

Conversation

@addaleax
Copy link
Member

@addaleax addaleax commented Aug 1, 2018

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.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

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.
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Aug 1, 2018
@addaleax addaleax added the worker Issues and PRs related to Worker support. label Aug 1, 2018
@addaleax
Copy link
Member Author

addaleax commented Aug 2, 2018

@addaleax addaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Aug 8, 2018
@addaleax
Copy link
Member Author

addaleax commented Aug 8, 2018

@addaleax
Copy link
Member Author

addaleax commented Aug 9, 2018

Landed in e3bae65

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. worker Issues and PRs related to Worker support.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants