The priority parameter of NWDSERegisterForEvent specifies the registered priority of a callback.The behavior of a callback must respond partly to its registered priority.
This section covers the following topics:
The priority flags determine the order in which handlers are notified when an event is generated. When an event is generated, the module reports the event to the Slot Table. Handlers are notified in the following order:
The following figure illustrates how the handlers are notified. It also traces which thread is used to process the handler’s callback function.

The graphic shows the thread paths for three events. To simplify the graphic, each event has handlers registered for only one priority. The dots (·) indicate the beginning of a thread, or at least where the thread’s processing starts as it enters the eDirectory event system.
The EP_INLINE priority provides synchronous pre-event reporting, as follows:
The EP_JOURNAL priority provides synchronous post-event reporting, as follows:
IMPORTANT:While inside this callback, use discretion in calling NWDS functions that create more eDirectory events. This is a closed loop where the growth of the journal queue could be uncontrollable.
The EP_WORK priority provides asynchronous postevent reporting, as follows:
For handlers registered for priority 0, the thread that generates the event is used to process all the handler callback functions. When they are finished processing, the thread returns to the module that generated the event. Since the same thread is used to process all the callback functions, callbacks need to return as quickly as possible.
Because the thread that generates the event is the same thread that processes the handlers’ callback functions, the callback functions can influence the outcome of the event. However, the last handler called has the final say. The value that is reported by the last handler is used for handlers that have registered for the other priorities and is returned the module that generated the event.
If more than one handler registers for priority 0, the handler cannot specify its position in the list. Handlers are added in the order they register. However, one handler can register to be the auditor handler (DSHF_AUDIT) with a notify flag. This places this handler last in the list and allows the handler’s callback function to have the final say in whether the event fails or succeeds. Only one handler can register as the auditor handler.
For handlers registered for priority 1, the thread that generates the event reports the event to the eDirectory Event Slot Table and immediately returns to the module that generated the event. The Slot Table then assigns a different thread to process all the callback functions registered for priority 1. Since the same thread is used to process all the callback functions, callbacks need to return as quickly as possible.
For handlers registered for priority 2, the thread that generates the event reports the event to the Slot Table and immediately returns to the module that generated the event. The eDirectory Event Slot Table then assigns a different thread to each registered handler. Since each callback function has its own thread, the callback function can be scheduled to do work that is time consuming. The results of the callbacks are asynchronous because the finishing order is indeterminate.
Each callback thread consumes a service process that is a limited resource on NetWare.