Multithreading and IOUs
The packages are multithread-hot and multithread-safe, which means that they create threads to complete their tasks. Each protocol request and agent action runs in a separate thread. The packages handle thread creation, management, and synchronization for you using the Threads Module of SourcePro Core.
The packages use Threads Module IOUs to allow asynchronous communication. All of the agent and client methods return RWTIOUResults, which are vouchers that can be redeemed for actual results. This means that operations never block unless you make them block by redeeming the result before the protocol command has completed its action. The IOU architecture enables you to use multithreading without explicitly handling the synchronization complexities that multithreading introduces.
The following sections briefly describe how to use IOUs. For more information, see the Threads Module User’s Guide and the Threads Module Platform Guide.