SignalAndWait for lock-context
I have a manager class that produces tasks for a threadpool, and each thread is supposed to do a call back once they are finished. I use locks to handle variables and fields, and signals to handle interthread communications. What I'm looking for is a way of exiting the current lock() and wait for a signal atomically, something like Sign...