PHPackages                             madnh/task\_waiter - 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. madnh/task\_waiter

ActiveLibrary

madnh/task\_waiter
==================

Waiting for a task in other php process complete

0.1(9y ago)0144MITPHP

Since Mar 2Pushed 9y ago1 watchersCompare

[ Source](https://github.com/madnh/task_waiter)[ Packagist](https://packagist.org/packages/madnh/task_waiter)[ RSS](/packages/madnh-task-waiter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Task Waiter
===========

[](#task-waiter)

This class help to detect tasks in multiple simultaneous processes were completed or not.

Install
-------

[](#install)

**Composer**

```
composer require madnh/task_waiter

```

Properties
----------

[](#properties)

- **static::$savePath**: place to save task files

Methods
-------

[](#methods)

- **static::start(`$taskName`)**: start a task, other comming php process will hold until this task is complete or current process finished.
- **static::isWorking(`$taskName`)**: check if a task is running in any of process.
- **static::complete(`$taskName`)**: set status of a task is complete. Other processes can continue their business.

Example
=======

[](#example)

Run below example in multiple command prompts

```
use MaDnh\TaskWaiter\TaskWaiter as Task;

echo "Start example\n";
$task = 'example_task';

//Task::$savePath = __DIR__;

echo Task::isWorking($task) ? "Task is running in other process" : 'Task is free';

print "\n";

if (Task::start($task)) {
    echo "Task is in processing!\n";

    sleep(5);
    Task::complete($task);

    echo "Task complete!\n";
    echo "Do other process!\n";

    sleep(5);
} else {
    echo "Start failed";
}

echo "Bye!";
```

[Example result image](http://i.imgur.com/o9S5SIi.gifv)

[![Example result](https://camo.githubusercontent.com/4f58b65b98d69ff80f79efc7a743f3d6950d65f90645ccd2a5aa460c49465491/687474703a2f2f692e696d6775722e636f6d2f6f3953355349692e676966)](https://camo.githubusercontent.com/4f58b65b98d69ff80f79efc7a743f3d6950d65f90645ccd2a5aa460c49465491/687474703a2f2f692e696d6775722e636f6d2f6f3953355349692e676966)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3355d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

phptask-waiter

### Embed Badge

![Health badge](/badges/madnh-task-waiter/health.svg)

```
[![Health](https://phpackages.com/badges/madnh-task-waiter/health.svg)](https://phpackages.com/packages/madnh-task-waiter)
```

PHPackages © 2026

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