LockSet:tryAcquireOrBackoff use optional<ref_wrapper<Qutex>>
Replace the previous Qutex** raw pointer with a std::optional.
This commit is contained in:
+4
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user