These activities enable asynchronous programming.
send() broadcasts a signal or a list
of signals. Arrivals can subscribe to signals and (optionally) assign a handler with
trap(). Note that, while inside a batch, all the signals subscribed before entering
the batch are ignored. Upon a signal reception, the arrival stops the current activity and
executes the handler (if provided). Then, the execution returns to the activity following the
point of the interruption.
untrap() can be used to unsubscribe from signals.
wait() blocks until a signal is received.
send(.trj, signals, delay = 0) trap(.trj, signals, handler = NULL, interruptible = TRUE) untrap(.trj, signals) wait(.trj)
Returns the trajectory object.