2017 © Pedro Peláez
 

library parallel

Easily allows forking up to a max number of processes

image

centraldesktop/parallel

Easily allows forking up to a max number of processes

  • Tuesday, September 26, 2017
  • by treyhyde
  • Repository
  • 12 Watchers
  • 0 Stars
  • 19,586 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

An easy to use and simple library for doing parallel processing using simple process forks., (*1)

All credit should go to the amazing maintainers of Perl's (CPAN) Parallel::ForkManager which I used for about 10 years., (*2)

To use:

Add this package to your composer dependencies., (*3)

use CentralDesktop\Parallel\ForkManager;, (*4)

// build an object, limit to total concurrent processes., (*5)

You must declare(ticks = 1); in order for signal handing to work properly in PHP, (*6)

$fm = new ForkManager(10); $fm->start();, (*7)

while ($fm->alive()) { if ($fm->start()) { continue; }, (*8)

do_something();, (*9)

$fm->stop(); } $fm->shutdown_all();, (*10)

You probably may want to handle specific signals by installing signal handlers., (*11)

$fm->set_parent_sighandler(array($this, 'parent_signal_handler'));, (*12)

$fm->set_child_sighandler(array($this, 'child_signal_handler'));, (*13)

The Versions

26/09 2017

dev-master

9999999-dev

Easily allows forking up to a max number of processes

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

12/09 2016

0.9.6

0.9.6.0

Easily allows forking up to a max number of processes

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

16/02 2016

0.9.5

0.9.5.0

Easily allows forking up to a max number of processes

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

05/01 2016

0.9.4

0.9.4.0

Easily allows forking up to a max number of processes

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

05/01 2016

dev-hotfix/pid1

dev-hotfix/pid1

Easily allows forking up to a max number of processes

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

05/01 2016

0.9.3

0.9.3.0

Easily allows forking up to a max number of processes

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

09/12 2015

0.9.2

0.9.2.0

Easily allows forking up to a max number of processes

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

09/12 2015

dev-notice_errors

dev-notice_errors

Easily allows forking up to a max number of processes

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

19/04 2013

0.9.1

0.9.1.0

Easily allows forking up to a max number of processes

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires