---
name: "Event"
section: "3cc"
platform: "linux"
package: "libcommoncpp2-dev"
version: "1.0.13-5"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/Event"
---

# Event(3cc)

The Event class implements a feature originally found in the WIN32 API; event notification. Thread synchornization on event notification.

## NAME

Event - The Event class implements a feature originally found in the WIN32 API; event notification. **Thread** synchornization on event notification.

## SYNOPSIS

`#include <thread.h>`

### Public Methods

**Event** ()\
 virtual **~Event** ()\
 void **reset** (void)\
 *Once signaled, the Event class must be 'reset' before responding to a new signal.* void **signal** (void)\
 *Signal the event for the waiting thread.* bool **wait** (**timeout\_t** timer)\
 *Wait either for the event to be signaled by another thread or for the specified timeout duration.* bool **wait** (void)\

## DETAILED DESCRIPTION

The Event class implements a feature originally found in the WIN32 API; event notification. **Thread** synchornization on event notification.

A target thread waits on a resetable Event, and one or more other threads can then signal the waiting thread to resume  execution. A timeout can be used to specify a wait duration in  milliseconds. The Event class must be reset before it can be used again  as a trigger. These event objects use a trigger/reset mechanism and are related to low level conditional variables.

@author: David Sugar \<dyfet@ostel.com\>

## CONSTRUCTOR & DESTRUCTOR DOCUMENTATION

### Event::Event ()

### virtual Event::~Event ()` [virtual]`

## MEMBER FUNCTION DOCUMENTATION

### void Event::reset (void)

Once signaled, the Event class must be 'reset' before responding to a new signal.

**See also:**  **signal**

### void Event::signal (void)

Signal the event for the waiting thread.

### bool Event::wait (void)

### bool Event::wait (timeout\_t timer)

Wait either for the event to be signaled by another thread or for the specified timeout duration.

**See also:**  **signal**

**Returns:**  true if signaled, false if timed out.

**Parameters:**

- *timer*

  *timeout in milliseconds to wait for a signal.*

## AUTHOR

*Generated automatically by Doxygen for CommonC++ from the source code.*
