HP-UX SNAplus2 CPI-C Programmer's Guide (June 2003)

Concepts
Nonblocking Operation
Chapter 156
Nonblocking Operation
This section does not apply to Java CPI-C. Java CPI-C functions always
operate in blocking mode; that is, the function does not return control to
the application until the requested processing has completed.
By default, CPI-C functions operate in blocking mode; that is, the
function does not return control to the application until the requested
processing has completed. For example, the Confirm function does not
return until CPI-C has sent a confirmation request to the partner
application and received either an OK or an error response from it.
CPI-C functions can also operate in nonblocking mode; that is, the
function returns control to the application immediately, even if the
requested processing has not yet completed. This enables the application
to continue with other processing that is not related to this conversation,
and obtain the results of the verb processing at a later stage.
For Unix The application can use the function Check_For_Completion to
determine whether a previous nonblocking function has now completed,
or Wait_For_Conversation to wait for it to complete. Table 1-5,
Nonblocking Operation, shows an example of the use of nonblocking
mode.
Table 1-5 Nonblocking Operation
Invoking Program Invoked Program
Initialize_Conversation
Allocate
Send_Data
Set_Processing Mode (CM_NON_BLOCKING)
Confirm
(
return_code
=CM_OPERATION_INCOMPLETE)
[Application can perform other processing not
related to this conversation.]
Accept_conversation