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

Add a unit test that for when a pool is blocked with no tasks #109

Merged
merged 5 commits into from
Aug 21, 2024

Conversation

TrentHouliston
Copy link
Member

Currently, there exists a bug where if all threads in a pool can't execute due to being blocked by a group, they will sleep forever

For now this PR only has a test that identifies the issue until a fix is found

TrentHouliston added a commit that referenced this pull request Aug 21, 2024
The old scheduler had the possiblity of a deadlock when two of the
threads came in and tried to acquire the idle and pool mutexes at the
same time.

This scheduler has rearranged parts of the locks to ensure that
deadlocks don't happen.
As a side effect should also fix the issue raised in #109

A feature which has come about as a result is that tasks may belong to
multiple sync groups at once
@TrentHouliston TrentHouliston marked this pull request as ready for review August 21, 2024 04:04
@TrentHouliston TrentHouliston changed the title Add a unit test that reveals a bug when a task is blocked with no tasks Add a unit test that for when a pool is blocked with no tasks Aug 21, 2024
@TrentHouliston TrentHouliston enabled auto-merge (squash) August 21, 2024 04:06
@TrentHouliston TrentHouliston merged commit c48d005 into main Aug 21, 2024
8 of 12 checks passed
@TrentHouliston TrentHouliston deleted the houliston/grouppool branch August 21, 2024 04:06
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.

1 participant