-
Rosen Penev authored
SonarLint reports the latter to be better: std::scoped_lock basically provides the same feature as std::lock_guard, but is more generic: It can lock several mutexes at the same time, with a deadlock prevention mechanism (see {rule:cpp:S5524}). The equivalent code to perform simultaneous locking with std::lock_guard is significantly more complex. Therefore, it is simpler to use std::scoped_lock all the time, even when locking only one mutex (there will be no performance impact). Signed-off-by:
Rosen Penev <rosenp@gmail.com>
4e0e4c00
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
patches | Loading commit data... | |
Delegate.cxx | ||
Delegate.hxx | ||
Easy.hxx | ||
Error.hxx | ||
Escape.cxx | ||
Escape.hxx | ||
Form.cxx | ||
Form.hxx | ||
Global.cxx | ||
Global.hxx | ||
Handler.hxx | ||
Init.cxx | ||
Init.hxx | ||
Multi.hxx | ||
Parser.hxx | ||
Request.cxx | ||
Request.hxx | ||
Slist.hxx | ||
String.hxx | ||
Version.cxx | ||
Version.hxx | ||
meson.build |