mkrauser / phing-foreach-parallel-task

phing task to run sub-tasks in a foreach-loop in separate, parallel processes
2 stars 2 forks source link

ForeachParallel-Task for Phing

project status

Maintainer Contact

Matthias Krauser mail: matthias@krauser.eu twitter: @mat_krauser

Changelog

1.0.0 (2014-10-27)

Documentation

The foreach-parallel-task for phing behaves exactly like the normal foreach-task. From the documentation of the foreach-task:

The foreach task iterates over a list, a list of filesets, or both. If both, list and filesets, are specified, the list will be evaluated first. Nested filesets are evaluated in the order they appear in the task.

The only difference is, that the iterations are not executed sequentially but parallel. It like a foreach-version of phing's ParallelTask.

This only works on *nix machines with pcntl-extension installed. If the requirements are not fullfilled, the foreach-parallel-task will behave like a regular foreach-task.

Installation

The suggested installation method is via composer:

php composer.phar require "doctrine/instantiator:~1.0.3"

Usage

Credits

This library task was heavily inspired by ParallelTask from Michiel Rook (mrook@php.net), which is part of the Phing-Core.