Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dispatch: fix a race condition triggering an assert()
If we were waiting, and then exiting due to timeout, we still have to recheck the condition protected by the condition variable/mutex in order to get back to a consistent state. In this case, the queue was locked with mp_dispatch_lock(), and mp_dispatch_queue_process() got to return without waiting for unlock. Also caused commit 8716c2e. Probably an argument for replacing the dispatch queue by a simple mutex.
- Loading branch information