PHPackages                             zeus/async - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. zeus/async

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

zeus/async
==========

A library that can run objects async with PHP

35PHP

Since Jan 13Pushed 2y ago1 watchersCompare

[ Source](https://github.com/diloabininyeri/async)[ Packagist](https://packagist.org/packages/zeus/async)[ RSS](/packages/zeus-async/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Php async
---------

[](#php-async)

Provides async running objects with PHP via process spawn

for installation via composer

```
composer require zeus/async:dev-main
```

php test code

```
use Zeus\Async\AsyncProcess;
use Zeus\Async\test\Sleep;

require_once 'vendor/autoload.php';

$asyncProcess = new AsyncProcess();
$asyncProcess->add(new Sleep(2));
$asyncProcess->add(new Sleep(1));
$asyncProcess->add(new Sleep(2));
$asyncProcess->add(new Sleep(1));
$asyncProcess->add(new Sleep(3));
$asyncProcess->add(new Sleep(1));
$asyncProcess->add(new Sleep(2));
$asyncProcess->add(new Sleep(2));
$asyncProcess->add(new Sleep(1));

echo 'app started';

$asyncProcess->start();

echo 'app progressing';
$asyncProcess->wait();

echo 'app is finished';
```

Synchronous
-----------

[](#synchronous)

If you want some objects to run in Sync, you can do this through the Mutex object.

```
use Zeus\Async\AsyncProcess;
use Zeus\Async\Mutex;
use Zeus\Async\test\Sleep;
use Zeus\Async\test\SleepSync;

require_once 'vendor/autoload.php';

$mutex = new Mutex();

$asyncProcess = new AsyncProcess(7);

$asyncProcess->add(new SleepSync($mutex, 2));
$asyncProcess->add(new Sleep(1));
$asyncProcess->add(new SleepSync($mutex, 2));

$asyncProcess->start();
$asyncProcess->wait();
```

Mutex
-----

[](#mutex)

In critical transactions, some operations may need to wait for some operations, the best example of this is if two people try to buy a ticket at the same time, it will make one of them wait atomically.

```
$mutex = new Mutex();

$mutex->lock();
//critic operations
$mutex->unlock();
```

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity19

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

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

---

Top Contributors

[![diloabininyeri](https://avatars.githubusercontent.com/u/16406839?v=4)](https://github.com/diloabininyeri "diloabininyeri (4 commits)")

---

Tags

asyncconcurencymutexmutex-lockmutex-semaphoreparalelismphp

### Embed Badge

![Health badge](/badges/zeus-async/health.svg)

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

PHPackages © 2026

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