Hi Jake,
The documentation for Condition.wait says:
wait c m atomically unlocks the mutex m and suspends the calling process on the condition variable c. The process will restart after the condition variable c has been signalled. The mutex m is locked again before wait returns.
I figured that I needed to lock and unlock the mutex in the child threads because otherwise it is possible for the condition variable to be signaled before the main thread waits, which I thought means that the signal is lost.
Thanks Daniel, I'll take a look at it.
--
gregory malecha