A lock_guard is sufficient for this function. No need for unique_lock.