Name: Anonymous 2012-02-28 0:51
I'm writing a program for recognizing and validating a specific set of integer values called ``dubs''. If the message handler is ready for dubs, it sends a
CHECK_EM message to the thread. When it receives a CHECK_EM, it replies with a NICE_DUBS message. How can I avoid a TOCTOU (Time-of-check Time-of-use) race condition by making sure that no other messages are sent to the thread between the time it enters the dubs ready state and the time the dubs are checked?