]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common/Finisher: use `std::lock_guard` instead of `std::unique_lock`
authorMax Kellermann <max.kellermann@ionos.com>
Mon, 7 Oct 2024 19:13:22 +0000 (21:13 +0200)
committerMax Kellermann <max.kellermann@ionos.com>
Thu, 10 Oct 2024 05:31:52 +0000 (07:31 +0200)
commit5b97c09b6f02dc91f98d4ce70e7bb50ab2d26840
tree5c261558f83e87ecdbbe4aadd6af2df92eb6bea0
parentc4c4b640f5c7859c219f8d4b70513424d1253402
common/Finisher: use `std::lock_guard` instead of `std::unique_lock`

`std::lock_guard` is all we need here, and the added complexity of
`std::unique_lock` is not used and is usually optimized away by the
compiler.  Using `std::lock_guard` directly will reduce the amount of
work that the optimizer needs to do and saves some build CPU cycles.

Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
src/common/Finisher.cc
src/common/Finisher.h