… | |
… | |
502 | programs when otherwise you couldn't - for example, when you use POSIX |
502 | programs when otherwise you couldn't - for example, when you use POSIX |
503 | threads in your perl process then it generally isn't safe to call |
503 | threads in your perl process then it generally isn't safe to call |
504 | fork from perl, but it is safe to use this module to execute external |
504 | fork from perl, but it is safe to use this module to execute external |
505 | processes. |
505 | processes. |
506 | |
506 | |
507 | AnyEvent-Fork cpan cvs-pod(Fork.pm,) cvs-pod(Fork/Early.pm) cvs-pod(Fork/Template) cvs-co(Changes) |
507 | AnyEvent-Fork cpan cvs-pod(Fork.pm,) cvs-pod(Fork/Early.pm) cvs-pod(Fork/Template.pm) cvs-co(Changes) list(anyevent) irc(anyevent) |
508 | Everything you wanted to use fork() for, but couldn't. |
508 | Everything you wanted to use fork() for, but couldn't. |
509 | |
509 | |
510 | This module allows you to create new processes, without actually forking |
510 | This module allows you to create new processes, without actually forking |
511 | them from your current process (avoiding the problems of forking), but |
511 | them from your current process (avoiding the problems of forking), but |
512 | preserving most of the advantages of fork. |
512 | preserving most of the advantages of fork. |
… | |
… | |
514 | It can be used to create new worker processes or new independent |
514 | It can be used to create new worker processes or new independent |
515 | subprocesses for short- and long-running jobs, process pools (e.g. for |
515 | subprocesses for short- and long-running jobs, process pools (e.g. for |
516 | use in pre-forked servers) but also to spawn new external processes (such |
516 | use in pre-forked servers) but also to spawn new external processes (such |
517 | as CGI scripts from a webserver), which can be faster (and more well |
517 | as CGI scripts from a webserver), which can be faster (and more well |
518 | behaved) than using fork+exec in big processes. |
518 | behaved) than using fork+exec in big processes. |
|
|
519 | |
|
|
520 | AnyEvent-Fork-RPC cpan cvs-pod(RPC.pm,) cvs-co(Changes) list(anyevent) irc(anyevent) |
|
|
521 | Simple RPC extension for AnyEvent::Fork |
|
|
522 | |
|
|
523 | This module implements a simple RPC protocol and backend for processes |
|
|
524 | created via L<AnyEvent::Fork>, allowing you to call a function in the |
|
|
525 | child process and receive its return values (up to 4GB serialised). |
|
|
526 | |
|
|
527 | It implements two different backends: a synchronous one that works like a |
|
|
528 | normal function call, and an asynchronous one that can run multiple jobs |
|
|
529 | concurrently in the child, using AnyEvent. |
|
|
530 | |
|
|
531 | It also implements an asynchronous event mechanism from the child to the |
|
|
532 | parent, that could be used for progress indications or other information. |
|
|
533 | |
|
|
534 | AnyEvent-Fork-Pool cpan cvs-pod(Pool.pm,) cvs-co(Changes) list(anyevent) irc(anyevent) |
|
|
535 | Simple process pool manager on top of AnyEvent::Fork and AnyEvent::Fork::RPC. |
|
|
536 | |
|
|
537 | This module uses processes created via AnyEvent::Fork and the RPC |
|
|
538 | protocol implement in AnyEvent::Fork::RPC to create a load-balanced pool |
|
|
539 | of processes that handles jobs. |
|
|
540 | |
|
|
541 | Understanding of AnyEvent::Fork is helpful but not critical to be able |
|
|
542 | to use this module, but a thorough understanding of AnyEvent::Fork::RPC |
|
|
543 | is, as it defines the actual API that needs to be implemented in the |
|
|
544 | children. |
519 | |
545 | |
520 | Guard cpan cvs-pod(Guard.pm,) cvs-co(Changes) |
546 | Guard cpan cvs-pod(Guard.pm,) cvs-co(Changes) |
521 | This small module implements scope and object guards, that is, code blocks |
547 | This small module implements scope and object guards, that is, code blocks |
522 | that are executed when a scope is being exited (or an object is destroyed). |
548 | that are executed when a scope is being exited (or an object is destroyed). |
523 | |
549 | |