-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
Hi @obiltschnig @aleks-f I have a question about Condition class.
Why we need an external mutex, and why is used in tryWait like that?
{
ScopedUnlock<Mtx> unlock(mutex, false);
Event event;
{
FastMutex::ScopedLock lock(_mutex);
mutex.unlock();
enqueue(event);
}
if (!event.tryWait(milliseconds))
{
FastMutex::ScopedLock lock(_mutex);
dequeue(event);
return false;
}
return true;
}
I can't undertand the reason
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels