Synchronous and Asynchronous Verb Completion

LUA verbs can complete execution either synchronously or asynchronously.

Synchronous Verb Completion

When LUA is able to complete all the processing for a verb as soon as it is issued, the verb has completed synchronously. When this happens, the primary return code is set to a value other than lua_in_progress, and the lua_flag2.async bit is set to zero. Note that the value of the lua_flag2.async bit should be tested, not the primary return code being not equal to lua_in_progress. (See individual verb descriptions for information on these returned parameters.)

Asynchronous Verb Completion

Some LUA verbs (for example, RUI_PURGE) complete quickly after local processing; however, most verbs take some time to complete because they require messages to be sent to and received from the local node or the host application.

When LUA must wait for information from the remote LU or from the local node before it can complete a verb, the verb completes asynchronously.

When this happens, the lua_flag2.async bit is set to 1. The primary return code is also normally set to lua_in_progress, but this value cannot be relied on. The value of the lua_flag2.async bit should be tested. The application can now perform other processing, or wait for notification from LUA that the verb has completed. LUA issues this notification by setting the primary return code to its final value and leaving lua_flag2.async set to 1.

When the verb completes, LUA does the following depending on your environment: