reduce redundancy of try_lock()/lock() in mutex