concurrencyoop
Keep locks out of slow waits when safe
Anonymous
When safe, copy the state needed for a slow operation while holding the lock, then release the lock before waiting on that operation. Holding a shared lock during a slow wait can block unrelated work; releasing it without a safe snapshot can introduce races.
0