![]() |
Kochol Game Engine
0.1.0
|
#include <KgeCond.h>
Public Member Functions | |
KgeCond () | |
Constructor. | |
~KgeCond () | |
Destructor. | |
void | Wait (KgeMutex *pMutex) |
void | Signal () |
Restart one of the threads that are waiting on the condition variable. | |
void | Broadcast () |
Restart all threads that are waiting on the condition variable. |
Protected Attributes | |
SDL_cond * | m_pCond |
kge::core::KgeCond::KgeCond | ( | ) |
Constructor.
kge::core::KgeCond::~KgeCond | ( | ) |
Destructor.
void kge::core::KgeCond::Broadcast | ( | ) |
Restart all threads that are waiting on the condition variable.
void kge::core::KgeCond::Signal | ( | ) |
Restart one of the threads that are waiting on the condition variable.
Referenced by kge::core::TSQueue< Task * >::push().
void kge::core::KgeCond::Wait | ( | KgeMutex * | pMutex | ) |
Wait on the condition variable, unlocking the provided mutex.
The mutex is re-locked once the condition variable is signaled.
Referenced by kge::core::TSQueue< Task * >::wait_and_pop().