Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
Poco::Event Class Reference

#include <Event.h>

+ Inheritance diagram for Poco::Event:
+ Collaboration diagram for Poco::Event:

Public Types

enum  EventType { EVENT_MANUALRESET , EVENT_AUTORESET }
 

Public Member Functions

 Event (EventType type=EVENT_AUTORESET)
 
 Event (bool autoReset)
 
 ~Event ()
 Please use Event::Event(EventType) instead.
 
void set ()
 Destroys the event.
 
void wait ()
 
void wait (long milliseconds)
 Waits for the event to become signalled.
 
bool tryWait (long milliseconds)
 
void reset ()
 

Private Member Functions

 Event (const Event &)
 Resets the event to unsignalled state.
 
Eventoperator= (const Event &)
 
- Private Member Functions inherited from Poco::EventImpl
 EventImpl (bool autoReset)
 
 ~EventImpl ()
 
void setImpl ()
 
void waitImpl ()
 
bool waitImpl (long milliseconds)
 
void resetImpl ()
 

Detailed Description

An Event is a synchronization object that allows one thread to signal one or more other threads that a certain event has happened. Usually, one thread signals an event, while one or more other threads wait for an event to become signalled.

Definition at line 37 of file Event.h.

Member Enumeration Documentation

◆ EventType

Enumerator
EVENT_MANUALRESET 
EVENT_AUTORESET 

Manual reset event.

Auto-reset event

Definition at line 47 of file Event.h.

Constructor & Destructor Documentation

◆ Event() [1/3]

Poco::Event::Event ( EventType type = EVENT_AUTORESET)
explicit
+ Here is the caller graph for this function:

◆ Event() [2/3]

Poco::Event::Event ( bool autoReset)
explicit

Creates the event. If type is EVENT_AUTORESET, the event is automatically reset after a wait() successfully returns.

◆ ~Event()

Poco::Event::~Event ( )

Please use Event::Event(EventType) instead.

◆ Event() [3/3]

Poco::Event::Event ( const Event & )
private

Resets the event to unsignalled state.

Member Function Documentation

◆ operator=()

Event & Poco::Event::operator= ( const Event & )
private

◆ reset()

void Poco::Event::reset ( )
inline

Waits for the event to become signalled. Returns true if the event became signalled within the specified time interval, false otherwise.

Definition at line 124 of file Event.h.

+ Here is the call graph for this function:

◆ set()

void Poco::Event::set ( )
inline

Destroys the event.

Definition at line 99 of file Event.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tryWait()

bool Poco::Event::tryWait ( long milliseconds)
inline

Waits for the event to become signalled. Throws a TimeoutException if the event does not become signalled within the specified time interval.

Definition at line 118 of file Event.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ wait() [1/2]

void Poco::Event::wait ( )
inline

Signals the event. If autoReset is true, only one thread waiting for the event can resume execution. If autoReset is false, all waiting threads can resume execution.

Definition at line 105 of file Event.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ wait() [2/2]

void Poco::Event::wait ( long milliseconds)
inline

Waits for the event to become signalled.

Definition at line 111 of file Event.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: