Skip to content

Conversation

@davidlattimore
Copy link

No description provided.

@davidlattimore
Copy link
Author

This fixes two different deadlocks when downsizing. The first, was that the heartbeat thread wouldn't shut down because we tried to join the heartbeath thread while still holding the lock on the threadpool's state mutex, which the heartbeat thread also needed to lock before it could know to shut down.

The second deadlock was that the worker threads weren't being woken up, so didn't know that they needed to shut down.

There are existing tests that were hitting these deadlocks. e.g. thread_pool::tests::join_basic now passes, where before it ran indefinitely.

Issue #37

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