Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change prevents an endless loop in: ReentrantCycleDetectingLock.…
…detectPotentialLocksCycle() Due to how code in ReentrantCycleDetectingLock.lockOrDetectPotentialLocksCycle() is synchronized, its possible for a thread to both own/hold a lock (according to ReentrantCycleDetectingLock.lockOwnerThread) and wait on the same lock (according to CycleDetectingLock.lockThreadIsWaitingOn). In this state, if another thread tries to hold the same lock an endless loop will occur when calling detectPotentialLocksCycle(). The change adds a workaround, forcing the cycle detection to exit if the above condition is met. Workaround for: #1510
- Loading branch information