Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fix TODO test for RT #124793
This test suffers from a multithreading bug known as "lost wakeup". A lost wakeup situation occurs when you have one thread signaling a condition variable, and another waiting on it. What happens is that the signal happens before the wait, and the thread waiting waits for a signal that will never come. Normally, it occurs because one side forgot to lock the mutex guarding the condition variable. However, since conditional variables are typically used to guard resources whose condition changes, it can still occur when using locks. The solution was to have the waiting thread check an artificial resource for readiness, and the signaling thread to make that artificial resource ready.
- Loading branch information