Replaced a few unique_lock with the mere mutex.lock