2017 © Pedro Peláez
 

symfony-bundle fork-bundle

Symfony Fork Bundle

image

symfony-bundles/fork-bundle

Symfony Fork Bundle

  • Tuesday, October 17, 2017
  • by khaperets
  • Repository
  • 4 Watchers
  • 10 Stars
  • 25 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 4 % Grown

The README.md

SymfonyBundles Fork Library

SensioLabsInsight, (*1)

![Build Status][testing-image] [Scrutinizer Code Quality][scrutinizer-code-quality-link] [Code Coverage][code-coverage-link] Total Downloads Latest Stable Version License, (*2)

Installation

Install the library with composer:, (*3)

``` bash composer require symfony-bundles/fork, (*4)


How to use (only cli-mode) -------------------------- Create the fork service: ``` php use SymfonyBundles\Fork; $fork = new Fork\Fork();

Create a task that implements an interface SymfonyBundles\Fork\TaskInterface. For example:, (*5)

``` php namespace AppBundle\Task;, (*6)

use SymfonyBundles\Fork\TaskInterface;, (*7)

class DemoTask implements TaskInterface { public function execute() { echo "Hello World!\n"; } }, (*8)


Now that the task is created, you can execute her in a plurality processes: ``` php use AppBundle\Task\DemoTask; $task = new DemoTask(); $fork->attach($task)->run(4)->wait(); // 4 - this is number of subprocesses

And another example: ``` php $task1 = new DemoTask(); $task2 = new DemoTask(); $task3 = new DemoTask();, (*9)

$fork->attach($task1)->attach($task2)->attach($task3); $fork->run(); // by default, the optimal number of subprocesses will be determined $fork->wait(); ```, (*10)

If you call method wait, the current process (main) will wait while all child processes will be finished., (*11)

The Versions

17/10 2017

dev-master

9999999-dev https://github.com/symfony-bundles/fork-bundle

Symfony Fork Bundle

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

by Dmitry Khaperets

bundle symfony thread process flow fork branching multiprocesses

17/10 2017

1.0.x-dev

1.0.9999999.9999999-dev https://github.com/symfony-bundles/fork-bundle

Symfony Fork Bundle

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

by Dmitry Khaperets

bundle symfony thread process flow fork branching multiprocesses

17/10 2017

v1.0.2

1.0.2.0 https://github.com/symfony-bundles/fork-bundle

Symfony Fork Bundle

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

by Dmitry Khaperets

bundle symfony thread process flow fork branching multiprocesses

09/08 2016

v1.0.1

1.0.1.0 https://github.com/symfony-bundles/fork-bundle

Symfony Fork Bundle

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

by Dmitry Khaperets

bundle symfony thread process flow fork branching multiprocesses

07/06 2016

dev-dev

dev-dev https://github.com/symfony-bundles/fork-bundle

Symfony Fork Bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dmitry Khaperets

bundle symfony thread process flow fork branching multiprocesses

07/06 2016

v1.0.0

1.0.0.0 https://github.com/symfony-bundles/fork-bundle

Symfony Fork Bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dmitry Khaperets

bundle symfony thread process flow fork branching multiprocesses