event/Loop: use std::scoped_lock with implicit template parameter
This commit is contained in:
parent
64bdaa46fb
commit
4fc3230fe6
|
@ -326,7 +326,7 @@ EventLoop::Run() noexcept
|
|||
/* try to handle DeferEvents without WakeFD
|
||||
overhead */
|
||||
{
|
||||
const std::scoped_lock<Mutex> lock(mutex);
|
||||
const std::scoped_lock lock{mutex};
|
||||
HandleInject();
|
||||
#endif
|
||||
|
||||
|
@ -349,7 +349,7 @@ EventLoop::Run() noexcept
|
|||
|
||||
#ifdef HAVE_THREADED_EVENT_LOOP
|
||||
{
|
||||
const std::scoped_lock<Mutex> lock(mutex);
|
||||
const std::scoped_lock lock{mutex};
|
||||
busy = true;
|
||||
}
|
||||
#endif
|
||||
|
@ -381,7 +381,7 @@ EventLoop::AddInject(InjectEvent &d) noexcept
|
|||
bool must_wake;
|
||||
|
||||
{
|
||||
const std::scoped_lock<Mutex> lock(mutex);
|
||||
const std::scoped_lock lock{mutex};
|
||||
if (d.IsPending())
|
||||
return;
|
||||
|
||||
|
@ -400,7 +400,7 @@ EventLoop::AddInject(InjectEvent &d) noexcept
|
|||
void
|
||||
EventLoop::RemoveInject(InjectEvent &d) noexcept
|
||||
{
|
||||
const std::scoped_lock<Mutex> protect(mutex);
|
||||
const std::scoped_lock protect{mutex};
|
||||
|
||||
if (d.IsPending())
|
||||
inject.erase(inject.iterator_to(d));
|
||||
|
@ -432,7 +432,7 @@ EventLoop::OnSocketReady([[maybe_unused]] unsigned flags) noexcept
|
|||
return;
|
||||
}
|
||||
|
||||
const std::scoped_lock<Mutex> lock(mutex);
|
||||
const std::scoped_lock lock{mutex};
|
||||
HandleInject();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue