… | |
… | |
650 | In the last form (message), a message of the form C<$rcvport, @msg, |
650 | In the last form (message), a message of the form C<$rcvport, @msg, |
651 | @reason> will be C<snd>. |
651 | @reason> will be C<snd>. |
652 | |
652 | |
653 | Monitoring-actions are one-shot: once messages are lost (and a monitoring |
653 | Monitoring-actions are one-shot: once messages are lost (and a monitoring |
654 | alert was raised), they are removed and will not trigger again, even if it |
654 | alert was raised), they are removed and will not trigger again, even if it |
655 | turns out that the port is still alive. |
655 | turns out that the port is still alive (but monitoring actions added after |
|
|
656 | that will again trigger). |
656 | |
657 | |
657 | As a rule of thumb, monitoring requests should always monitor a remote |
658 | As a rule of thumb, monitoring requests should always monitor a remote |
658 | port locally (using a local C<$rcvport> or a callback). The reason is that |
659 | port locally (using a local C<$rcvport> or a callback). The reason is that |
659 | kill messages might get lost, just like any other message. Another less |
660 | kill messages might get lost, just like any other message. Another less |
660 | obvious reason is that even monitoring requests can get lost (for example, |
661 | obvious reason is that even monitoring requests can get lost (for example, |
… | |
… | |
876 | #=item $cb2 = timeout $seconds, $cb[, @args] |
877 | #=item $cb2 = timeout $seconds, $cb[, @args] |
877 | |
878 | |
878 | =item cal $port, @msg, $callback[, $timeout] |
879 | =item cal $port, @msg, $callback[, $timeout] |
879 | |
880 | |
880 | A simple form of RPC - sends a message to the given C<$port> with the |
881 | A simple form of RPC - sends a message to the given C<$port> with the |
881 | given contents (C<@msg>), but adds a reply port to the message. |
882 | given contents (C<@msg>), but appends a reply port to the message. |
882 | |
883 | |
883 | The reply port is created temporarily just for the purpose of receiving |
884 | The reply port is created temporarily just for the purpose of receiving |
884 | the reply, and will be C<kil>ed when no longer needed. |
885 | the reply, and will be C<kil>ed when no longer needed. |
885 | |
886 | |
886 | A reply message sent to the port is passed to the C<$callback> as-is. |
887 | A reply message sent to the port is passed to the C<$callback> as-is. |