… | |
… | |
244 | sub mon_guard { |
244 | sub mon_guard { |
245 | my ($port, @refs) = @_; |
245 | my ($port, @refs) = @_; |
246 | |
246 | |
247 | mon $port, sub { 0 && @refs } |
247 | mon $port, sub { 0 && @refs } |
248 | } |
248 | } |
|
|
249 | |
|
|
250 | =item lnk $port1, $port2 |
|
|
251 | |
|
|
252 | Link two ports. This is simply a shorthand for: |
|
|
253 | |
|
|
254 | mon $port1, $port2; |
|
|
255 | mon $port2, $port1; |
|
|
256 | |
|
|
257 | It means that if either one is killed abnormally, the other one gets |
|
|
258 | killed as well. |
249 | |
259 | |
250 | =item $local_port = port |
260 | =item $local_port = port |
251 | |
261 | |
252 | Create a new local port object that supports message matching. |
262 | Create a new local port object that supports message matching. |
253 | |
263 | |