CORBA 2.3.3 Programmer's Guide for C++

and methods in these APIs, refer to the NonStop CORBA 2.3 Programmer's Reference.
Design of the Event Framework
The NonStop CORBA event framework supports the handling of I/O events over various transport protocols. It is the
core of the NonStop CORBA run-time environment and is designed to fit the needs of the ORB.
Note
The NonStop CORBA event framework is distinct from the Event Service, which is defined by OMG and is part of the
Common Object Services. The Event Service is a high-level application service that provides asynchronous
communication between components that use CORBA. The event framework is a low-level mechanism that does not
require (but does enable) both communicating components to use CORBA.
To provide an optimal tradeoff between coding, performance, and scalability within a process, the event framework uses
a hybrid asynchronous (event-driven) and synchronous (threaded) approach. The NonStop CORBA ORB library consists
of:
An asynchronous core that monitors and internalizes outside events
A synchronous CORBA API layer that transforms asynchronous events into a threaded synchronous paradigm.
Event Core
The event core, which cooperates with the NonStop DCE threading (pthread) mechanism, is a combination of the
following:
The null thread from the pthread package
An assortment of NonStop CORBA classes that interact with pthread functions
Data structures that affect the behavior of the null thread
The event core consists of several layers.
For further information about the pthread mechanism, refer to the NonStop DCE Application Programming Guide.
Null Thread
In a NonStop CORBA process, the null thread is launched during the operation of the ORB_init() method. Its purpose
is to map I/O completions to logical events, getting the next I/O event each time it goes through its loop. The null thread
runs at the lowest priority and loops through the following steps:
Calls a timer method to get a wait interval, representing the shortest amount of time the currently running process
will wait for an I/O event.
Calls the Guardian FILE_COMPLETE_ procedure, passing it the wait interval and a collection of OSS file
descriptors and Guardian file numbers. The Guardian file-number parameters are provided to the pthread package
by the creator of the I/O event.
Maps the results of the FILE_COMPLETE_ call to a registered event-handler function, then calls that function
with the remaining FILE_COMPLETE_ results.
Calls the pthread yield() function to allow any accumulated work to be performed by other threads.
Event Types
A process acting as an event handler registers interest in an event with the event core. When that event occurs, the event