cnd_signal wakes one thread waiting on a condition variable, allowing that thread to return from cnd_wait or cnd_timedwait. The waiter must recheck its condition in a loop because waking does not itself establish that the condition is true. section 20.5
Signal a waiting draw thread
After updating shared game state, a thread can notify the drawing thread with: cnd_signal(&L->draw); The signaling thread holds L->mtx while changing the state and issuing the signal. The draw thread waits on L->draw with that same mutex, then reacquires the mutex before inspecting the updated state. section 20.5
Use cnd_signal safely by following these rules:
- Change the data forming the condition, signal the condition variable, and protect both operations with the mutex used by the waiter. section 21.2
- Have the waiter test its condition in a while loop, including termination conditions such as L->finished. section 20.5
- Use cnd_broadcast instead when every waiting thread must be woken. section 20.5

