A customer was seeing a issue where ExclusiveOwnershipResourceManager would see a deadlock on shutdown. specifically in ShutdownAndWait which currently looks like
where m_resources never dips to zero making it so that the queue lock is never released which would never allow for ShutdownAndWait to run. by swapping ShutdownAndWait to be
Description of changes:
A customer was seeing a issue where
ExclusiveOwnershipResourceManager
would see a deadlock on shutdown. specifically inShutdownAndWait
which currently looks likeand issue could arise if in
Acquire
where m_resources never dips to zero making it so that the queue lock is never released which would never allow for
ShutdownAndWait
to run. by swappingShutdownAndWait
to bewe actually short circuit that while loops -- as intended. Also
m_shutdown
is atomic and can live outside of the lock.Check all that applies:
Check which platforms you have built SDK on to verify the correctness of this PR.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.