mirror of
https://github.com/wqking/eventpp.git
synced 2024-12-25 23:30:49 +08:00
Added mutex lock in function CallbackListBase::ownsHandle to avoid racing condition. See issue #57
This commit is contained in:
parent
0fe5dd65af
commit
cde8746409
@ -243,6 +243,8 @@ public:
|
||||
|
||||
bool ownsHandle(const Handle & handle) const
|
||||
{
|
||||
std::lock_guard<Mutex> lockGuard(mutex);
|
||||
|
||||
auto node = handle.lock();
|
||||
if(node) {
|
||||
while(node->previous) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user