Full Inter-Object Concurrency

Inter-object concurrency, where objects in a program are actively running methods at the same time, is provided for by REXX in two ways:

Early reply allows the object sending a message to keep on processing after the message is sent. Meanwhile, the receiving object runs the method corresponding to the message. This method contains the REPLY instruction, which returns any results to the sender, interrupting the sender just long enough to reply. The sender and receiver continue operating simultaneously.

Alternatively, an independent message object can be created and sent to a receiver. One difference in this approach is that any reply returned does not interrupt the sender. It waits until the sender asks for it. In addition, message objects can simply notify the sender about the completion of the method it sent, and even specify synchronous or asynchronous method activation.

The chains of execution represented by the sender method and the receiver method are called activities. An activity is a thread of execution that can run methods concurrently with methods on other activities. In other words, activities can run at the same time.

An activity contains a stack of invocations that represent the REXX programs running on the activity. An invocation can be: