6.3.2 Receive Action

When a blocking receive is executed by a QuLog thread the message buffer of the thread is searched from the oldest message to the most recent to see if there is a message term that is an instance of one of the message patterns from a sender with handle that is an instance of address patterns. The receive patterns are tried in their given before/after order. If a message is found that satisfies the two constraints of the ith rule it is removed, the Acti simple action sequence is executed and the receive is exited. Should the end message buffer be reached with no acceptable message found the thread will suspend until a new message arrives. Each new message is tested for acceptability. If there is a timeout rule this will be fired when T seconds have elapsed since the thread started its search for an acceptable message. DefaultAct is executed and the receive is exited. If there is no timeout rule the receive action will block indefinitely waiting for an acceptable message.

On This Site