EPAM B2BITS C++ MOEX/Spectra MarketData handler  1.24.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | List of all members
B2bits::WaitableEvent< AutoReset > Struct Template Reference

#include <b2bits/core/WaitableEvent.h>

Public Member Functions

 WaitableEvent (bool signaled=false)
 
void reset ()
 
void set ()
 
bool wait (unsigned ms=unsigned(-1))
 

Detailed Description

template<bool AutoReset>
struct B2bits::WaitableEvent< AutoReset >

Syncronization object. Notifies a waiting thread that an event has occurred.

Constructor & Destructor Documentation

template<bool AutoReset>
B2bits::WaitableEvent< AutoReset >::WaitableEvent ( bool  signaled = false)
inline

Default constructor

Member Function Documentation

template<bool AutoReset>
void B2bits::WaitableEvent< AutoReset >::reset ( )
inline

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

template<bool AutoReset>
void B2bits::WaitableEvent< AutoReset >::set ( )
inline

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

template<bool AutoReset>
bool B2bits::WaitableEvent< AutoReset >::wait ( unsigned  ms = unsigned(-1))
inline

Blocks the current thread until event is set to signaled state or timeout. If method returns true, event is automatically set to nonsignaled state.

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