---
name: "ACE_Reactor_Notify"
section: "3"
platform: "linux"
package: "libace-doc"
version: "5.0.7-4"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/ACE_Reactor_Notify"
---

# ACE\_Reactor\_Notify(3)

Abstract class for unblocking an ACE\_Reactor\_Impl from its event loop.

## NAME

ACE\_Reactor\_Notify -  Abstract class for unblocking an ACE\_Reactor\_Impl from its event loop.

## SYNOPSIS

```
#include <ace/Reactor_Impl.h>
class ACE_Reactor_Notify : public ACE_Event_Handler
{
  public:
    virtual int open (
        ACE_Reactor_Impl *,
        ACE_Timer_Queue *timer_queue = 0,
        int disable_notify = 0
        ) = 0;
    virtual int close (void) = 0;
    virtual ssize_t notify (
        ACE_Event_Handler * = 0,
        ACE_Reactor_Mask = ACE_Event_Handler::EXCEPT_MASK,
        ACE_Time_Value * = 0
        ) = 0;
    virtual int dispatch_notifications (
        int &number_of_active_handles,
        ACE_Handle_Set &rd_mask
        ) = 0;
    virtual void max_notify_iterations (int) = 0;
    virtual int max_notify_iterations (void) = 0;
    virtual void dump (void) const = 0;
};
```

## Initialization and termination methods.

```
virtual int open (
    ACE_Reactor_Impl *,
    ACE_Timer_Queue *timer_queue = 0,
    int disable_notify = 0
    ) = 0;
```

```
virtual int close (void) = 0;
```

```
virtual ssize_t notify (
    ACE_Event_Handler * = 0,
    ACE_Reactor_Mask = ACE_Event_Handler::EXCEPT_MASK,
    ACE_Time_Value * = 0
    ) = 0;
```

Called by a thread when it wants to unblock the Reactor\_Impl. This wakeups the Reactor\_Impl if currently blocked.  Pass over both the Event\_Handler \*and\* the mask to allow the caller to dictate which Event\_Handler method the Reactor\_Impl will invoke.  The ACE\_Time\_Value indicates how long to blocking trying to notify the Reactor\_Impl.  If timeout == 0, the caller will block until action is possible, else will wait until the relative time specified in \*timeout elapses).

```
virtual int dispatch_notifications (
    int &number_of_active_handles,
    ACE_Handle_Set &rd_mask
    ) = 0;
```

Handles pending threads (if any) that are waiting to unblock the Reactor\_Impl.

```
virtual void max_notify_iterations (int) = 0;
```

Set the maximum number of times that the handle\_input method will iterate and dispatch the ACE\_Event\_Handlers that are passed in via the notify queue before breaking out of the event loop.  By default, this is set to -1, which means "iterate until the queue is empty."  Setting this to a value like "1 or 2" will increase "fairness" (and thus prevent starvation) at the expense of slightly higher dispatching overhead.

```
virtual int max_notify_iterations (void) = 0;
```

Get the maximum number of times that the handle\_input method will iterate and dispatch the ACE\_Event\_Handlers that are passed in via the notify queue before breaking out of its event loop.

```
virtual void dump (void) const = 0;
```

Dump the state of an object.

## AUTHOR

Irfan Pyarali

## LIBRARY

ace
