PHPackages                             icicleio/concurrent - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. icicleio/concurrent

ActiveLibrary[Queues &amp; Workers](/categories/queues)

icicleio/concurrent
===================

Concurrency component for Icicle.

v0.3.0(10y ago)17235.8k6[2 issues](https://github.com/icicleio/concurrent/issues)[1 PRs](https://github.com/icicleio/concurrent/pulls)2MITPHP

Since Sep 29Pushed 9y ago12 watchersCompare

[ Source](https://github.com/icicleio/concurrent)[ Packagist](https://packagist.org/packages/icicleio/concurrent)[ Docs](http://icicle.io)[ RSS](/packages/icicleio-concurrent/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (3)Versions (10)Used By (2)

Concurrency for Icicle
======================

[](#concurrency-for-icicle)

**True concurrency using native threading and multiprocessing for parallelizing code, *without* blocking.**

This library is a component for [Icicle](https://github.com/icicleio/icicle) that provides native threading, multiprocessing, process synchronization, shared memory, and task workers. Like other Icicle components, this library uses [Coroutines](https://icicle.io/docs/manual/coroutines/) built from [Awaitables](https://icicle.io/docs/manual/awaitables/) and [Generators](http://www.php.net/manual/en/language.generators.overview.php) to make writing asynchronous code more like writing synchronous code.

[![Build Status](https://camo.githubusercontent.com/fffaa4b810ad0446c0882a48ba710f4d7a2e380b6a788ce30036df5f8619a9d8/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f696369636c65696f2f636f6e63757272656e742f76312e782e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/icicleio/concurrent)[![Coverage Status](https://camo.githubusercontent.com/a923863202b6eca9aac8302270d9b41a09d6f42e0fe0b8f3f0107cac88c1384b/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f696369636c65696f2f636f6e63757272656e742f76312e782e7376673f7374796c653d666c61742d737175617265)](https://coveralls.io/r/icicleio/concurrent)[![Semantic Version](https://camo.githubusercontent.com/322dec5b6e85ce9b7b4225e9458b48aee7ed3920c59105ce0320cefee8719c94/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f696369636c65696f2f636f6e63757272656e742e7376673f7374796c653d666c61742d737175617265)](http://semver.org)[![MIT License](https://camo.githubusercontent.com/c79c345de92f1fb5aea5b65d5f02b4a32e19995a23264fbf921ba287bad6974a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f696369636c65696f2f636f6e63757272656e742e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![@icicleio on Twitter](https://camo.githubusercontent.com/fb16a2e03bb85dd9926a15e837d3754b7766046281e2698271930aadbcd972cf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f747769747465722d253430696369636c65696f2d3531383963372e7376673f7374796c653d666c61742d737175617265)](https://twitter.com/icicleio)

This library provides a means of parallelizing code 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.

#### Documentation and Support

[](#documentation-and-support)

- [Full API Documentation](https://icicle.io/docs/api/Concurrent/)
- [Official Twitter](https://twitter.com/icicleio)
- [Gitter Chat](https://gitter.im/icicleio/icicle)

##### Requirements

[](#requirements)

- PHP 5.5+ for v0.3.x branch (current stable) and v1.x branch (mirrors current stable)
- PHP 7 for v2.0 (master) branch supporting generator delegation and return expressions

##### Suggested

[](#suggested)

- [pthreads extension](https://pecl.php.net/package/pthreads): Best extension option for concurrency in PHP, but it requires PHP to be compiled with `--enable-maintainer-zts` to enable thread-safety.
- [pcntl extension](http://php.net/manual/en/book.pcntl.php): Enables forking concurrency method.
- [sysvmsg extension](http://php.net/manual/en/book.sem.php): Required for sharing memory between forks or processes.

##### Installation

[](#installation)

The recommended way to install is with the [Composer](http://getcomposer.org/) package manager. (See the [Composer installation guide](https://getcomposer.org/doc/00-intro.md) for information on installing and using Composer.)

Run the following command to use this package in your project:

```
composer require icicleio/concurrent
```

You can also manually edit `composer.json` to add this library as a project requirement.

```
// composer.json
{
    "require": {
        "icicleio/concurrent": "^0.3"
    }
}
```

### Development and Contributing

[](#development-and-contributing)

Interested in contributing to Icicle? Please see our [contributing guidelines](https://github.com/icicleio/icicle/blob/master/CONTRIBUTING.md) in the [Icicle repository](https://github.com/icicleio/icicle).

Want to hack on the source? A [Vagrant](http://vagrantup.com) 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](https://github.com/FriendsOfPHP/pickle), switch versions with `newphp VERSION`, and test for memory leaks with [Valgrind](http://valgrind.org).

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 55.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~18 days

Total

9

Last Release

3739d ago

Major Versions

v0.3.0 → 1.x-dev2016-02-22

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1628287?v=4)[Aaron Piotrowski](/maintainers/Trowski)[@trowski](https://github.com/trowski)

---

Top Contributors

[![sagebind](https://avatars.githubusercontent.com/u/2192863?v=4)](https://github.com/sagebind "sagebind (185 commits)")[![trowski](https://avatars.githubusercontent.com/u/1628287?v=4)](https://github.com/trowski "trowski (147 commits)")[![yched](https://avatars.githubusercontent.com/u/193080?v=4)](https://github.com/yched "yched (1 commits)")

---

Tags

streamasyncasynchronous

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/icicleio-concurrent/health.svg)

```
[![Health](https://phpackages.com/badges/icicleio-concurrent/health.svg)](https://phpackages.com/packages/icicleio-concurrent)
```

###  Alternatives

[amphp/amp

A non-blocking concurrency framework for PHP applications.

4.4k123.4M323](/packages/amphp-amp)[react/socket

Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP

1.3k116.9M402](/packages/react-socket)[revolt/event-loop

Rock-solid event loop for concurrent PHP applications.

92343.6M138](/packages/revolt-event-loop)[amphp/parallel

Parallel processing component for Amp.

85046.2M74](/packages/amphp-parallel)[amphp/byte-stream

A stream abstraction to make working with non-blocking I/O simple.

393116.2M104](/packages/amphp-byte-stream)[icicleio/icicle

Icicle is a PHP library for writing asynchronous code using synchronous coding techniques.

1.1k150.9k14](/packages/icicleio-icicle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
