![]() |
Number5
Visualisierung 2 Project - Florian Schober (0828151, f.schober@live.com), Andreas Walch (0926780, walch.andreas89@gmail.com)
|
#include <TaskManager.hpp>
Public Member Functions | |
auto_reset_event () | |
void | signal () |
Sets the event to signaled-mode. More... | |
void | signalN (uint n) |
Sets the event to signaled-mode (N-times, i.e. to wake up N threads) More... | |
void | wait (uint nTimes=1) |
Wait (block) until the event is set to signaled-mode. More... | |
Private Attributes | |
mutex | m_mutex |
A mutex used for synchronization. More... | |
condition_variable | m_cv |
A condition variable used for synchronization. More... | |
uint | m_signal |
Wheter or not the event is currently signalled. More... | |
auto_reset_event is a synchronization-structure used for thread-synchronization. Threads can wait for a singal that is given by another thread. After the signal was given the event resets itself to 'unsignaled' state.
Definition at line 36 of file TaskManager.hpp.
auto_reset_event | ( | ) |
Constructs a auto_reset_event
Definition at line 36 of file TaskManager.cpp.
void signal | ( | ) |
Sets the event to signaled-mode.
Definition at line 40 of file TaskManager.cpp.
void signalN | ( | uint | n | ) |
Sets the event to signaled-mode (N-times, i.e. to wake up N threads)
Definition at line 50 of file TaskManager.cpp.
void wait | ( | uint | nTimes = 1 | ) |
Wait (block) until the event is set to signaled-mode.
Definition at line 61 of file TaskManager.cpp.
|
private |
A condition variable used for synchronization.
Definition at line 39 of file TaskManager.hpp.
|
private |
A mutex used for synchronization.
Definition at line 38 of file TaskManager.hpp.
|
private |
Wheter or not the event is currently signalled.
Definition at line 40 of file TaskManager.hpp.