1
0
mirror of https://github.com/danog/parallel.git synced 2024-11-30 04:39:01 +01:00
Go to file
2017-12-07 18:26:52 +01:00
bin Simplify checking environment class name 2017-11-30 23:58:41 -06:00
examples Update examples 2017-11-29 20:17:49 -06:00
lib Only modify binary path if null 2017-12-06 16:01:11 -06:00
test Run tasks in-order 2017-12-06 15:59:28 -06:00
travis Update for export of mutex and semaphore to amphp/sync 2017-11-29 14:12:28 -06:00
.gitattributes example → examples 2017-06-16 00:04:10 -05:00
.gitignore Apply Amp's code style 2017-05-18 09:51:31 +02:00
.php_cs.dist Fix php-cs-fixer config 2017-06-17 18:23:28 +02:00
.travis.yml Use phpdbg on travis 2017-12-05 23:23:49 -06:00
.valgrindrc Add helpful defaults for Valgrind 2015-08-27 12:33:19 -05:00
appveyor.yml Enable debug on phpunit 2017-12-07 17:39:30 +01:00
composer.json Use Amp's debugging coroutine for AppVeyor debugging 2017-12-07 18:26:52 +01:00
LICENSE Update readme and license 2017-11-29 18:27:30 -06:00
Makefile Apply Amp's code style 2017-05-18 09:51:31 +02:00
phpdoc.dist.xml Port to Amp 2016-08-18 11:04:48 -05:00
phpunit.xml.dist Update to PHPUnit 6 and use helper package 2017-03-21 23:19:15 -05:00
README.md Typo and copy/paste fixes 2017-12-04 11:49:31 -06:00
Vagrantfile Update vagrant box for PHP 7 2016-01-23 10:50:56 -06:00

parallel

Build Status Code Coverage Release License

True parallel processing using multiple processes or native threads for concurrent code execution, without blocking.

amphp/parallel a component for Amp that provides native threading, multiprocessing, process synchronization, shared memory, and task workers. Like other Amp components, this library uses Coroutines built from Promises and Generators to make writing asynchronous code more like writing synchronous code.

This library provides a means of executing code concurrently without littering your application with complicated lock checking and inter-process communication.

To be as flexible as possible, this library comes with a collection of non-blocking concurrency tools that can be used independently as needed, as well as an "opinionated" worker API that allows you to assign units of work to a pool of worker threads or processes.

Installation

This package can be installed as a Composer dependency.

composer require amphp/parallel

Requirements

  • PHP 7.0+ (no extensions required)

Documentation

Documentation can be found on amphp.org/parallel as well as in the ./docs directory.

Versioning

amphp/parallel follows the semver semantic versioning specification like all other amphp packages.

Security

If you discover any security related issues, please email me@kelunik.com instead of using the issue tracker.

License

The MIT License (MIT). Please see LICENSE for more information.

Development and Contributing

Want to hack on the source? A Vagrant box is provided with the repository to give a common development environment for running concurrent threads and processes, and comes with a bunch of handy tools and scripts for testing and experimentation.

Starting up and logging into the virtual machine is as simple as

vagrant up && vagrant ssh

Once inside the VM, you can install PHP extensions with Pickle, switch versions with newphp VERSION, and test for memory leaks with Valgrind.