handle CondWait by converting it into MutLock