[orc-rt] Prefer std::scoped_lock to std::lock_guard. NFCI. (#179165)

This commit is contained in:
Lang Hames 2026-02-02 16:14:12 +11:00 committed by GitHub
parent 496d871ff3
commit ec6a219fc3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -100,7 +100,7 @@ void Session::shutdownComplete() {
std::unique_ptr<TaskDispatcher> TmpDispatcher;
{
std::lock_guard<std::mutex> Lock(M);
std::scoped_lock<std::mutex> Lock(M);
TmpDispatcher = std::move(Dispatcher);
}
@ -108,7 +108,7 @@ void Session::shutdownComplete() {
std::vector<OnShutdownCompleteFn> OnCompletes;
{
std::lock_guard<std::mutex> Lock(M);
std::scoped_lock<std::mutex> Lock(M);
SI->Complete = true;
OnCompletes = std::move(SI->OnCompletes);
}