… | |
… | |
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::Remote cpan cvs-pod(Remote.pm,) cvs-co(Changes) list(anyevent) irc(anyevent) |
|
|
521 | remote processes with AnyEvent::Fork interface |
|
|
522 | |
|
|
523 | Despite what the name of this module might suggest, it doesn't actually |
|
|
524 | create remote processes for you. But it does make it easy to use them, |
|
|
525 | once you have started them. |
|
|
526 | |
|
|
527 | This module implements a very similar API as AnyEvent::Fork. In fact, |
|
|
528 | similar enough to require at most minor modifications to support both |
|
|
529 | at the same time. For example, it works with AnyEvent::Fork::RPC and |
|
|
530 | AnyEvent::Fork::Pool. |
|
|
531 | |
|
|
532 | AnyEvent-Fork-RPC cpan cvs-pod(RPC.pm,) cvs-co(Changes) list(anyevent) irc(anyevent) |
|
|
533 | Simple RPC extension for AnyEvent::Fork |
|
|
534 | |
|
|
535 | This module implements a simple RPC protocol and backend for processes |
|
|
536 | created via AnyEvent::Fork, allowing you to call a function in the |
|
|
537 | child process and receive its return values (up to 4GB serialised). |
|
|
538 | |
|
|
539 | It implements two different backends: a synchronous one that works like a |
|
|
540 | normal function call, and an asynchronous one that can run multiple jobs |
|
|
541 | concurrently in the child, using AnyEvent. |
|
|
542 | |
|
|
543 | It also implements an asynchronous event mechanism from the child to the |
|
|
544 | parent, that could be used for progress indications or other information. |
|
|
545 | |
|
|
546 | AnyEvent-Fork-Pool cpan cvs-pod(Pool.pm,) cvs-co(Changes) list(anyevent) irc(anyevent) |
|
|
547 | Simple process pool manager on top of AnyEvent::Fork and AnyEvent::Fork::RPC. |
|
|
548 | |
|
|
549 | This module uses processes created via AnyEvent::Fork and the RPC |
|
|
550 | protocol implement in AnyEvent::Fork::RPC to create a load-balanced pool |
|
|
551 | of processes that handles jobs. |
|
|
552 | |
|
|
553 | Understanding of AnyEvent::Fork is helpful but not critical to be able |
|
|
554 | to use this module, but a thorough understanding of AnyEvent::Fork::RPC |
|
|
555 | is, as it defines the actual API that needs to be implemented in the |
|
|
556 | children. |
519 | |
557 | |
520 | Guard cpan cvs-pod(Guard.pm,) cvs-co(Changes) |
558 | Guard cpan cvs-pod(Guard.pm,) cvs-co(Changes) |
521 | This small module implements scope and object guards, that is, code blocks |
559 | 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). |
560 | that are executed when a scope is being exited (or an object is destroyed). |
523 | |
561 | |