Qutex: currOwner should use registered sh_ptr to Lockvoker
This ensures that the Lockvoker object we access from currOwner remains valid past the lifetime of the Lockvoker object that gets copied and invoked by boost::asio
This commit is contained in:
+3
-2
@@ -90,13 +90,14 @@ public:
|
||||
void release();
|
||||
|
||||
#ifdef CONFIG_ENABLE_DEBUG_LOCKS
|
||||
LockerAndInvokerBase* getCurrOwner() const { return currOwner; }
|
||||
std::shared_ptr<LockerAndInvokerBase> getCurrOwner() const
|
||||
{ return currOwner; }
|
||||
#endif
|
||||
|
||||
public:
|
||||
#ifdef CONFIG_ENABLE_DEBUG_LOCKS
|
||||
std::string name;
|
||||
LockerAndInvokerBase* currOwner;
|
||||
std::shared_ptr<LockerAndInvokerBase> currOwner;
|
||||
#endif
|
||||
SpinLock lock;
|
||||
LockerAndInvokerBase::List queue;
|
||||
|
||||
Reference in New Issue
Block a user