1
0
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:
wqking 2023-03-09 15:25:52 +08:00
parent 0fe5dd65af
commit cde8746409

View File

@ -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) {