Replacing signal() with broadcast() (an operation that wakes…
Replacing signal() with broadcast() (an operation that wakes all waiting threads rather than the first one) in a correct condition variable program can never introduce a correctness bug; it can only affect performance.