Base Framework
|
Event signaling mechanism. More...
#include <base/concurrency/Event.h>
Inherits Resource.
Public Member Functions | |
Event () | |
Event (NullPtr) noexcept | |
bool | isSignaled () const |
void | reset () |
void | signal () |
void | wait () const |
bool | wait (unsigned int microseconds) const |
OperatingSystem::Handle | getHandle () const noexcept |
~Event () | |
![]() | |
String | getDescription () const |
void | setDescription (const String &description) |
unsigned int | getResourceId () const |
unsigned int | getCreatedById () const |
AnyReference | getHandle () const noexcept |
template<class TYPE > | |
TYPE & | getInternalHandle () const |
operator bool () const noexcept | |
Additional Inherited Members | |
![]() | |
AnyReference | handle |
|
explicit |
Initializes the event in the non-signaled state.
|
inlineexplicitnoexcept |
Initializes the event as invalid.
Event::~Event | ( | ) |
Destroys the event object.
|
noexcept |
Returns the event handle. Not supported by all platforms in which case nullptr is returned.
bool Event::isSignaled | ( | ) | const |
Returns true if this event is in the signaled state.
void Event::reset | ( | ) |
Resets the event. Returns when all waiting threads.
void Event::signal | ( | ) |
Signal the waiting threads. Control is returned immediately.
void Event::wait | ( | ) | const |
Waits for signal. The executing thread is suspended until event is signaled. Will wait forever if the event is never signaled. Raises an Overflow exception if the maximum number of waiting threads is exceeded.
bool Event::wait | ( | unsigned int | microseconds | ) | const |
Waits for the event to be signaled. The executing thread is suspended until the event is signaled or the specified time-out interval expires. May throw an 'Overflow' exception if the maximum number of waiting threads is exceeded.
microseconds | The desired time out interval in microseconds. The value must be in the range from 0 to 1000000000. The exception 'OutOfDomain' is raised if this range is violated. |