PHPackages                             intermezzon/asyncprocess - 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. intermezzon/asyncprocess

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

intermezzon/asyncprocess
========================

Execute multiple processes asynchronously

2.0.0(6y ago)24.3k↓22.7%[1 PRs](https://github.com/Intermezzon/asyncprocess/pulls)MITPHP

Since Dec 10Pushed 1y ago2 watchersCompare

[ Source](https://github.com/Intermezzon/asyncprocess)[ Packagist](https://packagist.org/packages/intermezzon/asyncprocess)[ Docs](https://github.com/Intermezzon/asyncprocess)[ RSS](/packages/intermezzon-asyncprocess/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (3)Dependencies (2)Versions (5)Used By (0)

AsyncProcess
============

[](#asyncprocess)

Helper to start multiple processes simultaneously.

Lets start with an example:

```
$pool = new \Intermezzon\AsyncProcess\Pool();
$pool->addCommand('php -r "echo \"Start process.\"; sleep(2); echo \"Process ended\";"');

// Wait for all commands to be done
$pool->executeAndWait();
```

You may start multiple processes simultaneously

```
$pool = new \Intermezzon\AsyncProcess\Pool();
$pool->addCommand('php -r "echo \"Start process 1.\n\"; sleep(2); echo \"Process 1 ended\n\";"');
$pool->addCommand('php -r "echo \"Start process 2.\n\"; sleep(1); echo \"Process 2 ended\n\";"');

// Wait for all commands to be done
$pool->executeAndWait();
```

Events
------

[](#events)

You may also monitor output, errors and handle ended process

```
$pool = new \Intermezzon\AsyncProcess\Pool();
$pool->addCommand('my_program')
	->started(function ($command)) {
		echo "Process has started\n";
	})
	->output(function ($command, $output) {
		echo "Process outputed:" . $output . "\n";
		// Send stuff to process stdin
		$command->input("send this input to process stdin");
	})
	->error(function ($command, $error) {
		echo "Process send error: " . $error ."\n";
	})
	->ended(function ($command, $exitCode) {
		echo "Process ended with exit code: " . $exitCode . "\n";
		echo "Process took " . $command->totalTime . " seconds to execute.";
	});

// Wait for all commands to be done
$pool->executeAndWait();
```

Settings
--------

[](#settings)

You may want to limit the number of simultaneously running processes so that you do not overload your system.

```
$pool = new \Intermezzon\AsyncProcess\Pool();
$pool->setMaxProcesses(3);
```

Kudoz
-----

[](#kudoz)

This has been inspired by

-
-

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 85.7% 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 ~15 days

Total

3

Last Release

2367d ago

Major Versions

1.1.0 → 2.0.02020-01-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/bdbbfea7508463116edd2d208b9703c01655efb648fda1b1342d25c5c94080ad?d=identicon)[onnerby](/maintainers/onnerby)

---

Top Contributors

[![onnerby](https://avatars.githubusercontent.com/u/1788794?v=4)](https://github.com/onnerby "onnerby (6 commits)")[![Sterd](https://avatars.githubusercontent.com/u/69079?v=4)](https://github.com/Sterd "Sterd (1 commits)")

---

Tags

phpasyncmultiprocess

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/intermezzon-asyncprocess/health.svg)

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

###  Alternatives

[riki137/multitron

Tool for managing fast both asynchronous and multi-threaded execution of tasks. Focused on performance and pleasant CLI interface.

9118.5k](/packages/riki137-multitron)[badfarm/zanzara

Asynchronous PHP Telegram Bot Framework

2022.5k](/packages/badfarm-zanzara)[jenner/async-mysql-php

php mysql async client

411.0k](/packages/jenner-async-mysql-php)[marwanalsoltany/amqp-agent

An elegant wrapper around the famous php-amqplib for 90% use case.

161.8k](/packages/marwanalsoltany-amqp-agent)

PHPackages © 2026

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