Poco::Event Class Reference

#include <Event.h>

Inheritance diagram for Poco::Event:

Inheritance graph
[legend]
Collaboration diagram for Poco::Event:

Collaboration graph
[legend]

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 88 of file Event.h.


Public Member Functions

 Event (bool autoReset=true)
 ~Event ()
 Creates the event. If autoReset is true, the event is automatically reset after a wait() successfully returns.
void set ()
 Destroys the event.
void wait ()
 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.
void wait (long milliseconds)
 Waits for the event to become signalled.
bool tryWait (long milliseconds)
 Waits for the event to become signalled. Throws a TimeoutException if the event does not become signalled within the specified time interval.
void reset ()
 Waits for the event to become signalled. Returns true if the event became signalled within the specified time interval, false otherwise.

Private Member Functions

 Event (const Event &)
 Resets the event to unsignalled state.
Eventoperator= (const Event &)

Constructor & Destructor Documentation

Poco::Event::Event ( bool  autoReset = true  ) 

Definition at line 80 of file Event.cpp.

Poco::Event::~Event (  ) 

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

Definition at line 85 of file Event.cpp.

Poco::Event::Event ( const Event  )  [private]

Resets the event to unsignalled state.


Member Function Documentation

void Poco::Event::set (  )  [inline]

Destroys the event.

Definition at line 140 of file Event.h.

References Poco::EventImpl::setImpl().

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 146 of file Event.h.

References Poco::EventImpl::waitImpl().

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

Waits for the event to become signalled.

Definition at line 152 of file Event.h.

References Poco::EventImpl::waitImpl().

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 159 of file Event.h.

References Poco::EventImpl::waitImpl().

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 165 of file Event.h.

References Poco::EventImpl::resetImpl().

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


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

SourceForge.net Logo
Project space on SourceForge.net