tidev / node-ios-device

Queries connected iOS devices and installs apps
Other
122 stars 37 forks source link

Lock tweaks #18

Closed sgtcoolguy closed 8 years ago

sgtcoolguy commented 8 years ago

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.

cb1kenobi commented 8 years ago

We'll give it a go! Thank you!