Number5
Visualisierung 2 Project - Florian Schober (0828151, f.schober@live.com), Andreas Walch (0926780, walch.andreas89@gmail.com)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
auto_reset_event Class Reference

#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...
 

Detailed Description

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.

Constructor & Destructor Documentation

Constructs a auto_reset_event

Definition at line 36 of file TaskManager.cpp.

Member Function Documentation

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.

Member Data Documentation

condition_variable m_cv
private

A condition variable used for synchronization.

Definition at line 39 of file TaskManager.hpp.

mutex m_mutex
private

A mutex used for synchronization.

Definition at line 38 of file TaskManager.hpp.

uint m_signal
private

Wheter or not the event is currently signalled.

Definition at line 40 of file TaskManager.hpp.


The documentation for this class was generated from the following files: