B2BITS FIX Antenna C++ 2.33.0
Loading...
Searching...
No Matches
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.
 
void pulse ()
 Wakes all waiting threads and sets state to nonsignaled.
 
void reset ()
 Sets the state of the event to nonsignaled, causing waiting threads to block.
 
void set ()
 Sets the state of the event to signaled, allowing one or more waiting threads to proceed.
 
void wait ()
 Blocks the current thread until event is set to signaled state.
 
bool wait (unsigned int msec)
 Blocks the current thread until event is set to signaled state or timeout.
 
virtual ~ManualEvent ()
 Destructor.
 

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