Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Check for tsfn in condition_variable wait #1168

Closed
wants to merge 1 commit into from

Conversation

KevinEady
Copy link
Contributor

Under certain conditions, the main thread may set the TSFN and notify the condition variable prior to the thread waiting on it, causing an indefinite hang. This PR fixes the hang by skipping the wait if the TSFN has been set.

Fixes: #1150

@KevinEady KevinEady requested a review from a team April 20, 2022 17:00
@mhdawson
Copy link
Member

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mhdawson
Copy link
Member

The CI runs that I started looked good. I'll go ahead and land as it should help get the ci green :). @KevinEady thanks for working on this.

mhdawson pushed a commit that referenced this pull request Apr 20, 2022
Fixes: #1150

PR-URL: #1168
Reviewed-By: Michael Dawson <midawson@redhat.com
@mhdawson
Copy link
Member

Landed in 24455f8

@mhdawson mhdawson closed this Apr 20, 2022
@mhdawson
Copy link
Member

Whoo-hoo a full green CI run across Node.js runs after landing this - https://ci.nodejs.org/view/x%20-%20Abi%20stable%20module%20API/job/node-test-node-addon-api-LTS%20versions/1481/
@KevinEady thanks again!

kevindavies8 added a commit to kevindavies8/node-addon-api-Develop that referenced this pull request Aug 24, 2022
Fixes: #1150

PR-URL: nodejs/node-addon-api#1168
Reviewed-By: Michael Dawson <midawson@redhat.com
Marlyfleitas added a commit to Marlyfleitas/node-api-addon-Development that referenced this pull request Aug 26, 2022
Fixes: #1150

PR-URL: nodejs/node-addon-api#1168
Reviewed-By: Michael Dawson <midawson@redhat.com
wroy7860 added a commit to wroy7860/addon-api-benchmark-node that referenced this pull request Sep 19, 2022
Fixes: #1150

PR-URL: nodejs/node-addon-api#1168
Reviewed-By: Michael Dawson <midawson@redhat.com
austinli64 added a commit to austinli64/node-addon-api that referenced this pull request May 9, 2023
Fixes: #1150

PR-URL: nodejs/node-addon-api#1168
Reviewed-By: Michael Dawson <midawson@redhat.com
johnfrench3 pushed a commit to johnfrench3/node-addon-api-git that referenced this pull request Aug 11, 2023
Fixes: #1150

PR-URL: nodejs/node-addon-api#1168
Reviewed-By: Michael Dawson <midawson@redhat.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regular hang in thread safe function in CI testing
2 participants