Use lock_guard instead of unique_lock