EPAM B2BITS MarketData C++ library  1.0.0
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules 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

◆ WaitableEvent()

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

Default constructor

Member Function Documentation

◆ reset()

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

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

◆ set()

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.

◆ wait()

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.