6. Creating an Application with OpenAPI : Sample Code : How the Asynchronous Sample Code Works : How the Server Execution Unit Works
Share this page                  
How the Server Execution Unit Works
The server execution unit demonstrates asynchronous processing using a Finite State Machine. A single callback function is used for all asynchronous OpenAPI calls. A control block passed with the asynchronous call contains the information necessary, including the current state, to process the call results and determine the next state and actions to be performed. The server unit continues waiting for and processing database events until the termination event is received. Upon receiving the termination event, the server unit cancels any active requests, frees resources, and terminates.