In asynchronous programming, the calling thread performs further operations while the Dialogic function completes. At completion, the application receives event notification. Asynchronous programming is recommended for applications that require coordination of multiple tasks and have large numbers of devices. Asynchronous programming uses system resources more efficiently because it controls multiple devices in a single thread. On the other hand, synchronous programming requires a separate thread for each Dialogic device.
Due to concurrent processing requirements, a thread cannot block execution while waiting for Dialogic functions, such as dx_play( ) or dx_record( ), to finish; this would interfere with the processing requirements of other devices being managed by the thread. In this case, the SRL lets you create an event-driven state machine for each device. Instead of each Dialogic function blocking until completion, it returns immediately and allows thread processing to continue. Subsequently, when an event is returned through the SRL, signifying the completion of the Dialogic operation, state machine processing can continue.
You can also place user-defined events into the Dialogic event queue to get single-point state processing control of non-Dialogic application states.
IIn summary, asynchronous programming:
Click here to contact Dialogic Customer Engineering
Copyright 2001, Dialogic Corporation