add a wrapped mutex/condvar to core::thread