ACTIVE_JOB: handler - callback for when an event is triggered

Name

Since this is a callback function, you are free to name it whatever you want. A pointer to this callback function must be stored in the field ACTIVE_JOB::handler.

For conveniece, we will refer to this function as my_handler() within this documentation.

Synopsis

#include "eventset.h"
int my_handler(ACTIVE_JOB * acp)

Description

The user-supplied callback function, here called my_handler(), will be called in the context of the worker thread whenever the corresponding ACTIVE_JOB::event is triggered.

Return value

This function must return one of:

Returning non-zero is equivalent to the management thread calling eventset_delete().

See also