When running parallel tasks with fewer than the maximum number of threads, ensure that the thread_id given to the caller's thread function is - #97
Merged
Conversation
copybara-service
Bot
force-pushed
the
test_977778601
branch
2 times, most recently
from
September 8, 2026 18:15
7ede031 to
db85807
Compare
…eads, ensure that the `thread_id` given to the caller's thread function is * Unique for each thread, * In the range `[0, pthreadpool_get_threads_count(threadpool))`. This change also fixes a memory-ordering issue where in some cases (with `futex` on ARM-based machines) not all threads were woken up when requested. PiperOrigin-RevId: 978018780
copybara-service
Bot
force-pushed
the
test_977778601
branch
from
September 8, 2026 18:22
db85807 to
d9ecbfe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When running parallel tasks with fewer than the maximum number of threads, ensure that the
thread_idgiven to the caller's thread function is[0, pthreadpool_get_threads_count(threadpool)).This change also fixes a memory-ordering issue where in some cases (with
futexon ARM-based machines) not all threads were woken up when requested.