AnyEvent-Fork
view release on metacpan or search on metacpan
perl version, or parts of a distribution are newer than the ones already
loaded.
This module supports creating pre-initialised perl processes to be used as
a template for new processes at a later time, e.g. for use in a process
pool.
=item Forking might be impossible when a program is running.
For example, POSIX makes it almost impossible to fork from a
multi-threaded program while doing anything useful in the child - in
fact, if your perl program uses POSIX threads (even indirectly via
e.g. L<IO::AIO> or L<threads>), you cannot call fork on the perl level
anymore without risking memory corruption or worse on a number of
operating systems.
This module can safely fork helper processes at any time, by calling
fork+exec in C, in a POSIX-compatible way (via L<Proc::FastSpawn>).
=item Parallel processing with fork might be inconvenient or difficult
to implement. Modules might not work in both parent and child.
For example, when a program uses an event loop and creates watchers it
and modules are no longer loadable because they refer to a different
perl version, or parts of a distribution are newer than the ones
already loaded.
This module supports creating pre-initialised perl processes to be
used as a template for new processes at a later time, e.g. for use
in a process pool.
Forking might be impossible when a program is running.
For example, POSIX makes it almost impossible to fork from a
multi-threaded program while doing anything useful in the child - in
fact, if your perl program uses POSIX threads (even indirectly via
e.g. IO::AIO or threads), you cannot call fork on the perl level
anymore without risking memory corruption or worse on a number of
operating systems.
This module can safely fork helper processes at any time, by calling
fork+exec in C, in a POSIX-compatible way (via Proc::FastSpawn).
Parallel processing with fork might be inconvenient or difficult to
implement. Modules might not work in both parent and child.
For example, when a program uses an event loop and creates watchers
it becomes very hard to use the event loop from a child program, as
( run in 0.431 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )