|
CallbackWaitLock is used to block a thread and unblock it from another thread via callback. More...
#include <ArmarXCore/core/time/CallbackWaitLock.h>
Public Member Functions | |
void | call () override |
CallbackWaitLock () | |
void | wait () |
wait blocks the calling thread until CallbackWaitLock::call() is called. More... | |
Public Member Functions inherited from CallbackReceiver | |
virtual | ~CallbackReceiver () |
Protected Attributes | |
bool | called |
whether call() was called (to prevent race conditions) More... | |
std::condition_variable | condWait |
std::mutex | waitMutex |
CallbackWaitLock is used to block a thread and unblock it from another thread via callback.
When wait() is called, the calling thread is blocked until call() is called from another thread. This is mainly intended as helper for TimeUtil::Sleep(,,,).
Definition at line 42 of file CallbackWaitLock.h.
CallbackWaitLock | ( | ) |
Definition at line 29 of file CallbackWaitLock.cpp.
|
overridevirtual |
Implements CallbackReceiver.
Definition at line 40 of file CallbackWaitLock.cpp.
void wait | ( | ) |
wait blocks the calling thread until CallbackWaitLock::call() is called.
Definition at line 31 of file CallbackWaitLock.cpp.
|
protected |
whether call() was called (to prevent race conditions)
Definition at line 61 of file CallbackWaitLock.h.
|
protected |
Definition at line 56 of file CallbackWaitLock.h.
|
protected |
Definition at line 57 of file CallbackWaitLock.h.