LockSet:tryAcquireOrBackoff use optional<ref_wrapper<Qutex>>

Replace the previous Qutex** raw pointer with a std::optional.
This commit is contained in:
2025-09-30 10:36:19 -04:00
parent e3ce533fe4
commit f15c07bc83
3 changed files with 10 additions and 10 deletions
+4 -1
View File
@@ -7,6 +7,7 @@
#include <stdexcept>
#include <utility>
#include <memory>
#include <optional>
#include <qutex.h>
#include <lockerAndInvokerBase.h>
@@ -85,7 +86,9 @@ public:
* @return true if all locks were acquired, false otherwise
*/
bool tryAcquireOrBackOff(
LockerAndInvokerBase &lockvoker, Qutex **firstFailedQutex = nullptr);
LockerAndInvokerBase &lockvoker,
std::optional<std::reference_wrapper<Qutex>> &firstFailedQutex
= std::nullopt);
void unregisterFromQutexQueues();
// @brief Release all locks