Fix condition waits in WorkQueue.