Jonathan Steinert > POE-Component-ForkManager > POE::Component::ForkManager

Download:
POE-Component-ForkManager-0.00_01.tar.gz

Dependencies

Annotate this POD

Module Version: 0.00_01   Source  

NAME ^

POE::Component::ForkManager - Perl extension for managing a preforking server in POE

SYNOPSIS ^

  use POE::Component::ForkManager;

  my $forkmanager = POE::Component::ForkManager->new( $minimum, $maximum );
  
  $forkmanager->limits( $minimum, $maximum );

  $forkmanager->callback( "name" => CODEREF );

DESCRIPTION ^

This module manages a pool of processes under POE. Processes can mark themselves either busy or idle and the parent will add or remove processes as necessary to maintain the limits set forth in either the new() or limits() call.

Callbacks are used to notify the child (and possibly the parent in the future) of certain events occuring.

CALLBACKS ^

child_fork

Occurs immediately after a new child process is forked off the parent. This new child is assumed to be idle.

child_shutdown

Occurs when a signal arrives from the parent indicating that this particular child process has been chosen to shut down. The process may finish any tasks it has running before shutting down, but the parent tries to choose a process which is idle (races can occur.)

SEE ALSO ^

POE

AUTHOR ^

Jonathan Steinert, <hachi@cpan.org>

COPYRIGHT AND LICENSE ^

Copyright (C) 2006 by Jonathan Steinert

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: