-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Internal Code
-
Fully Compatible
-
v6.0
-
Service Arch 2022-06-27, Service Arch 2022-07-11
-
1
Create a new RAII type that receives a unique_lock, unlocks it, and locks it again upon destruction:
stdx::unique_lock lk(mutex);
...
{
ScopedUnlockAndRelock scoped(lk);
// Do work without holding the lock
}
One example for using this type is replacing the scope-guard in here:
_inPoll = true; lk.unlock(); const ScopeGuard guard([&] { lk.lock(); _inPoll = false; });
- is related to
-
SERVER-49950 Address issues with ClockSource::setAlarm() and ClockSourceMock::_processAlarms()
- Closed
-
SERVER-63282 Refactor and simplify `BatonASIO`
- Closed