lock_guard simply looks and unlocks in scope. It's equivalent to using a unique lock (aka, it doesn't indicate it just wants to read) i think as a result both your reads and writes were all exclusively locking the mutex.
I changed the reads to use shared_lock over lock_guard. I also introduced a write lock on deleting a disconnected device.
lock_guard simply looks and unlocks in scope. It's equivalent to using a unique lock (aka, it doesn't indicate it just wants to read) i think as a result both your reads and writes were all exclusively locking the mutex.
I changed the reads to use shared_lock over lock_guard. I also introduced a write lock on deleting a disconnected device.