B2BITS FIX Antenna C++  2.27.1
Public Member Functions | Protected Attributes | List of all members
System::ManualEvent Class Reference


Syncronization object. More...

#include <B2BITS_ManualEvent.h>

+ Inheritance diagram for System::ManualEvent:

Public Member Functions

 ManualEvent (bool signaled=false)
 Default constructor. More...
 
void pulse ()
 Wakes all waiting threads and sets state to nonsignaled. More...
 
void reset ()
 Sets the state of the event to nonsignaled, causing waiting threads to block. More...
 
void set ()
 Sets the state of the event to signaled, allowing one or more waiting threads to proceed. More...
 
void wait ()
 
Blocks the current thread until event is set to signaled state More...
 
bool wait (unsigned int msec)
 
Blocks the current thread until event is set to signaled state or timeout. More...
 
virtual ~ManualEvent ()
 Destructor. More...
 

Protected Attributes

pthread_cond_t cond_
 
pthread_mutex_t mutex_
 
volatile int signaled_
 

Detailed Description


Syncronization object.

Notifies a waiting thread that an event has occurred.

Constructor & Destructor Documentation

◆ ManualEvent()

System::ManualEvent::ManualEvent ( bool  signaled = false)
explicit

Default constructor.

◆ ~ManualEvent()

virtual System::ManualEvent::~ManualEvent ( )
virtual

Destructor.

Member Function Documentation

◆ pulse()

void System::ManualEvent::pulse ( )

Wakes all waiting threads and sets state to nonsignaled.

◆ reset()

void System::ManualEvent::reset ( )

Sets the state of the event to nonsignaled, causing waiting threads to block.

◆ set()

void System::ManualEvent::set ( )

Sets the state of the event to signaled, allowing one or more waiting threads to proceed.

◆ wait() [1/2]

void System::ManualEvent::wait ( )


Blocks the current thread until event is set to signaled state

◆ wait() [2/2]

bool System::ManualEvent::wait ( unsigned int  msec)


Blocks the current thread until event is set to signaled state or timeout.

Returns
true if event is set to signaled state; false if time is out.

Member Data Documentation

◆ cond_

pthread_cond_t System::ManualEvent::cond_
protected

◆ mutex_

pthread_mutex_t System::ManualEvent::mutex_
protected

◆ signaled_

volatile int System::ManualEvent::signaled_
protected