HP-UX SNAplus2 MS Programmer's Guide
Writing MS Applications
Scheduling Asynchronous Events
Chapter 242
Scheduling Asynchronous Events
The method that an application uses to schedule asynchronous events
depends on which of the following types of application it is:
Single-threaded applications
Applications that are based around a single main
thread of execution to receive and process requests
Multithreaded applications
Applications that can have several threads of execution
receiving and processing requests
Motif applications
Applications that use the Motif interface and for which
the application code consists mainly of callbacks from
the Motif libraries
Single-Threaded Applications
To schedule asynchronous events, single-threaded applications can use
either the application scheduling mode or the signal-based scheduling
mode.
Application Scheduling Mode
Application scheduling mode gives the application full control over event
scheduling from different sources by integrating SNA callbacks with the
application's main processing loop. The application calls an SNA event
handler entry point in the SNA library when work is available for the
library to process, and the handler makes the necessary callbacks to the
application.
NOTE SNA callbacks can also be made from within other calls into the SNA
library.
To receive notification of SNA events, the application accesses the file
descriptor on which SNA events arrive. The application then calls the
SNA event handler to process events received on this file descriptor and