… | |
… | |
256 | If you need an external module for serialisation, then you can either |
256 | If you need an external module for serialisation, then you can either |
257 | pre-load it into your L<AnyEvent::Fork> process, or you can add a C<use> |
257 | pre-load it into your L<AnyEvent::Fork> process, or you can add a C<use> |
258 | or C<require> statement into the serialiser string. Or both. |
258 | or C<require> statement into the serialiser string. Or both. |
259 | |
259 | |
260 | =back |
260 | =back |
|
|
261 | |
|
|
262 | See the examples section earlier in this document for some actual examples. |
261 | |
263 | |
262 | =cut |
264 | =cut |
263 | |
265 | |
264 | our $STRING_SERIALISER = '(sub { pack "(w/a*)*", @_ }, sub { unpack "(w/a*)*", shift })'; |
266 | our $STRING_SERIALISER = '(sub { pack "(w/a*)*", @_ }, sub { unpack "(w/a*)*", shift })'; |
265 | |
267 | |
… | |
… | |
382 | |
384 | |
383 | The other thing that can be done with the RPC object is to destroy it. In |
385 | The other thing that can be done with the RPC object is to destroy it. In |
384 | this case, the child process will execute all remaining RPC calls, report |
386 | this case, the child process will execute all remaining RPC calls, report |
385 | their results, and then exit. |
387 | their results, and then exit. |
386 | |
388 | |
|
|
389 | See the examples section earlier in this document for some actual |
|
|
390 | examples. |
|
|
391 | |
387 | =back |
392 | =back |
388 | |
393 | |
389 | =head1 CHILD PROCESS USAGE |
394 | =head1 CHILD PROCESS USAGE |
390 | |
395 | |
391 | The following function is not available in this module. They are only |
396 | The following function is not available in this module. They are only |
… | |
… | |
399 | |
404 | |
400 | Send an event to the parent. Events are a bit like RPC calls made by the |
405 | Send an event to the parent. Events are a bit like RPC calls made by the |
401 | child process to the parent, except that there is no notion of return |
406 | child process to the parent, except that there is no notion of return |
402 | values. |
407 | values. |
403 | |
408 | |
|
|
409 | See the examples section earlier in this document for some actual |
|
|
410 | examples. |
|
|
411 | |
404 | =back |
412 | =back |
405 | |
413 | |
406 | =head1 SEE ALSO |
414 | =head1 SEE ALSO |
407 | |
415 | |
408 | L<AnyEvent::Fork> (to create the processes in the first place), |
416 | L<AnyEvent::Fork> (to create the processes in the first place), |