… | |
… | |
165 | |
165 | |
166 | The block will be called for every message received on the port. When the |
166 | The block will be called for every message received on the port. When the |
167 | callback returns a true value its job is considered "done" and the port |
167 | callback returns a true value its job is considered "done" and the port |
168 | will be destroyed. Otherwise it will stay alive. |
168 | will be destroyed. Otherwise it will stay alive. |
169 | |
169 | |
170 | The message will be passed as-is, no extra argument (ie.. no port id) will |
170 | The message will be passed as-is, no extra argument (i.e. no port id) will |
171 | be passed to the callback. |
171 | be passed to the callback. |
172 | |
172 | |
173 | If you need the local port id in the callback, this works nicely: |
173 | If you need the local port id in the callback, this works nicely: |
174 | |
174 | |
175 | my $port; $port = miniport { |
175 | my $port; $port = miniport { |