There are 2 methods of handling asynchronous processing;
•Stimulus Libraries
•Local and Remote Applications
Both types of asynchronous routines, create an additional processing thread, which allows the ESL application to continue processing. When the processing is complete, the routine sends a trigger message back to the main ESL application thread. The Stimulus Library has a very flexible interface, that enables all types of variables, including structures, to be passed to and from the processing, however, a Stimulus Library can be very complex to write, as you must;
•Create the additional threads,
•Close all additional threads before allowing the module to be unloaded,
•Handle calls from the ESL application, whilst processing another event,
•Allow for multiple instances of ESL to access the processing,
•Post a stimulus to the correct instance of ESL, when the processing is complete,
•Allocate memory of each of the instances of ESL being managed,
•Store the results of an event, until the ESL application uses a call to obtain them.
By contrast Local and Remote Applications are simple to write but also only provide an interface that passes a single string parameter. Although the interface is simple, with agreed protocols for; field separators, commands etc. it is possible to to pass complex parameters. The power of Local and Remote applications is demonstrated by the 4 database adaptors supplied with the ESL product. As all the complexity of handling the communication between the ESL application and the 'C' routines, is encapsulated in functions supplied with the ESL product, the Local and Remote application are as simple as writing an old fashioned text based application.