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

Fix errors causing some tests in PartitionTest to fail. #207

Merged
merged 1 commit into from
Jun 10, 2022

Conversation

daniepin
Copy link
Contributor

When trying to call join() on threads in Partitioner::startCoordinated() C++ will sometimes throw an invalid_argument exception as some of or all of the threads might be default constructed and therefore not joinable. This happens because the threads are only assigned a function if a given condition is met. This PR fixes this by checking if a thread is joinable before calling join() on the thread, which subsequently fixes and passes PartitionTest.test_1, PartitionTest.test_3, PartitionTest.test_5 and PartitionTest.test_7.

@github-actions github-actions bot added the core something about core label Jun 10, 2022
@ghost
Copy link

ghost commented Jun 10, 2022

👇 Click on the image for a new way to code review
  • Make big changes easier — review code in small groups of related files

  • Know where to start — see the whole change at a glance

  • Take a code tour — explore the change with an interactive tour

  • Make comments and review — all fully sync’ed with github

    Try it now!

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map Legend

Copy link
Owner

@ZigRazor ZigRazor left a comment

Choose a reason for hiding this comment

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

Good Work!

@ZigRazor ZigRazor merged commit 4d57cdf into ZigRazor:master Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core something about core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants