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

src: don't allow parallel calls to Update() #13

Merged
merged 2 commits into from
Oct 30, 2023

Conversation

trevnorris
Copy link
Member

ThreadMetrics::Update() is supposed to be thread-safe, so we need to guard against calls being made in parallel. Return UV_EBUSY if an asynchronous Update() is already being processed.

@trevnorris trevnorris self-assigned this Oct 30, 2023
Copy link
Member

@santigimeno santigimeno left a comment

Choose a reason for hiding this comment

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

ThreadMetrics::Update() is supposed to be thread-safe, so we need to
guard against calls being made in parallel. Return UV_EBUSY if an
asynchronous Update() is already being processed.

PR-URL: #13
Santiago Gimeno <santiago.gimeno@gmail.com>
Instead of updating the ASSERT with additional error info, remove them
since there's nothing to do in case there's an error.

PR-URL: #13
Santiago Gimeno <santiago.gimeno@gmail.com>
@trevnorris trevnorris merged commit 24bde1e into node-v20.x-nsolid-v5.x Oct 30, 2023
17 of 18 checks passed
@trevnorris trevnorris deleted the trevnorris/tm-run-check branch October 30, 2023 23:20
trevnorris added a commit that referenced this pull request Oct 30, 2023
ThreadMetrics::Update() is supposed to be thread-safe, so we need to
guard against calls being made in parallel. Return UV_EBUSY if an
asynchronous Update() is already being processed.

PR-URL: #13
Santiago Gimeno <santiago.gimeno@gmail.com>
trevnorris added a commit that referenced this pull request Oct 30, 2023
Instead of updating the ASSERT with additional error info, remove them
since there's nothing to do in case there's an error.

PR-URL: #13
Santiago Gimeno <santiago.gimeno@gmail.com>
trevnorris added a commit that referenced this pull request Dec 7, 2023
ThreadMetrics::Update() is supposed to be thread-safe, so we need to
guard against calls being made in parallel. Return UV_EBUSY if an
asynchronous Update() is already being processed.

PR-URL: #13
Reviewed-by: Santiago Gimeno <santiago.gimeno@gmail.com>
trevnorris added a commit that referenced this pull request Dec 7, 2023
Instead of updating the ASSERT with additional error info, remove them
since there's nothing to do in case there's an error.

PR-URL: #13
Reviewed-by: Santiago Gimeno <santiago.gimeno@gmail.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.

2 participants