Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix in Core: deadlock in
OrderedLock
class.
If a second thread called `lock` and was waiting on `cvar.back()`, the referenced `std::condition_variable` could be destructed by the first locking thread calling `unlock`, causing the second thread to `wait` forever. This is fixed by `pop`ing the queue only after `wait` completed (i.e. within `lock`). Additionally, spurious wakeups could cause the `wait` to end prematurely, which is fixed by using the predicated overload. Also made some naming improvements and fixed formatting.
- Loading branch information