PHPackages                             pecee/asynctask - 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. pecee/asynctask

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

pecee/asynctask
===============

AsyncTask enables proper and easy use of the thread. This class allows to perform background operations and publish results on the thread without having to manipulate threads and/or handlers.

1.0.7(10y ago)020BSD-3-ClausePHPPHP &gt;=5.3.3

Since Apr 18Pushed 10y ago1 watchersCompare

[ Source](https://github.com/skipperbent/asynctask)[ Packagist](https://packagist.org/packages/pecee/asynctask)[ Docs](http://www.pecee.dk/)[ RSS](/packages/pecee-asynctask/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (1)Dependencies (1)Versions (6)Used By (0)

[![Build Status](https://camo.githubusercontent.com/3e39c5b6262029efe132f5db3b4d93e47c69e16ae4d1583f7f9461c98087d964/68747470733a2f2f7472617669732d63692e6f72672f646d616d6f6e746f762f6173796e637461736b2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/dmamontov/asynctask)[![Latest Stable Version](https://camo.githubusercontent.com/611afe386551757a46c1dfb7c2b1565fce20d4a166ab2993c3e81ae779a786c7/68747470733a2f2f706f7365722e707567782e6f72672f646d616d6f6e746f762f6173796e637461736b2f762f737461626c652e737667)](https://packagist.org/packages/dmamontov/asynctask)[![License](https://camo.githubusercontent.com/a60d4330063aba04efaa314773d627f4ebbae9c5517bde30c7dcc26d709bc810/68747470733a2f2f706f7365722e707567782e6f72672f646d616d6f6e746f762f6173796e637461736b2f6c6963656e73652e737667)](https://packagist.org/packages/dmamontov/asynctask)[![Total Downloads](https://camo.githubusercontent.com/c5096d8905395c629a6d71eb22132710099333707fa0cb84a327e1743e6a6513/68747470733a2f2f706f7365722e707567782e6f72672f646d616d6f6e746f762f6173796e637461736b2f646f776e6c6f616473)](https://packagist.org/packages/dmamontov/asynctask)[![PHP Classes](https://camo.githubusercontent.com/8b4a94a79f43f44687b40e0a91a226a5b6d929b69cba415d01253b2343065bf0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d636c61737365732d626c75652e737667)](http://www.phpclasses.org/package/9047-PHP-Execute-asynchronous-tasks-in-the-background.html)

AsyncTask
=========

[](#asynctask)

AsyncTask enables proper and easy use of the thread. This class allows to perform background operations and publish results on the thread without having to manipulate threads and/or handlers. [More information](https://dmamontov.github.io/asynctask).

Fork description
----------------

[](#fork-description)

Forked to support HHVM

Requirements
------------

[](#requirements)

- PHP version ~5.3.3
- Module installed pcntl and posix
- All functions pcntl, posix and shm removed from the directive disable\_functions

Installation
------------

[](#installation)

1. Install [composer](https://getcomposer.org/download/)
2. Follow in the project folder:

```
composer require dmamontov/asynctask ~1.0.5
```

In config `composer.json` your project will be added to the library `dmamontov/asynctask`, who settled in the folder `vendor/`. In the absence of a config file or folder with vendors they will be created.

If before your project is not used `composer`, connect the startup file vendors. To do this, enter the code in the project:

```
require 'path/to/vendor/autoload.php';
```

### Example of work

[](#example-of-work)

```
class TestTask extends AsyncTask
{
    protected function onPreExecute()
    {
    }

    protected function doInBackground($parameters)
    {
        return $parameters;
    }

    protected function onPostExecute($result)
    {
        echo $result;
    }
}

$task = new TestTask();
$task->execute('test');
```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 90.9% 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 ~57 days

Total

5

Last Release

3858d ago

PHP version history (2 changes)1.0.2PHP &gt;=5.3.3

1.0.3PHP &gt;=5.3.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/2dab716ac4ac16ea3e01400efe43853b43821b33b8c601c2c772689d58cebf3c?d=identicon)[sessingo](/maintainers/sessingo)

---

Top Contributors

[![dmamontov](https://avatars.githubusercontent.com/u/5955726?v=4)](https://github.com/dmamontov "dmamontov (50 commits)")[![skipperbent](https://avatars.githubusercontent.com/u/634762?v=4)](https://github.com/skipperbent "skipperbent (4 commits)")[![amoogi](https://avatars.githubusercontent.com/u/142491?v=4)](https://github.com/amoogi "amoogi (1 commits)")

---

Tags

asynchronoushhvmtaskbackgroundwork days

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pecee-asynctask/health.svg)

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

###  Alternatives

[react/react

ReactPHP: Event-driven, non-blocking I/O with PHP.

9.1k3.6M65](/packages/react-react)[react/event-loop

ReactPHP's core reactor event loop that libraries can use for evented I/O.

1.3k152.5M726](/packages/react-event-loop)[phing/phing

PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant.

1.2k22.2M901](/packages/phing-phing)[dmamontov/asynctask-7

AsyncTask enables proper and easy use of the thread. This class allows to perform background operations and publish results on the thread without having to manipulate threads and/or handlers.

1313.2k](/packages/dmamontov-asynctask-7)[cocur/background-process

Start processes in the background that continue running when the PHP process exists.

2982.0M12](/packages/cocur-background-process)[laravel-admin-ext/scheduling

Task scheduling extension for laravel-admin

93251.5k6](/packages/laravel-admin-ext-scheduling)

PHPackages © 2026

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