Public Member Functions | |
void | signal () |
void | broadcast () |
void | wait (DummyThreadMutex &) |
spawn
functions only call the function but wait for it to return instead of running in on another thread, and the mutices do nothing really. The only reason to provide such a function is that the program can be compiled both in MT and non-MT mode without difference.In this particular case, just as with mutexes, the functions do nothing, and by this provide the same semantics of condition variables as in multi-threaded mode.
void Threads::DummyThreadCondition::signal | ( | ) | [inline] |
Signal to a single listener that a condition has been met, i.e. that some data will now be available. Since in single threaded mode, this function of course does nothing.
void Threads::DummyThreadCondition::broadcast | ( | ) | [inline] |
Signal to multiple listener that a condition has been met, i.e. that some data will now be available. Since in single threaded mode, this function of course does nothing.
void Threads::DummyThreadCondition::wait | ( | DummyThreadMutex & | ) | [inline] |
Wait for the condition to be signalled. Signal variables need to be guarded by a mutex which needs to be given to this function as an argument, see the man page of posix_cond_wait
for a description of the mechanisms. Since in single threaded mode, this function of course does nothing, but returns immediately.