friendsofhyperf/async-task

The async task for Hyperf.

v3.1.5 2023-12-20 04:25 UTC

README

Latest Stable Version Total Downloads License

The async task component for Hyperf.

Installation

composer require friendsofhyperf/async-task

Usage

use FriendsOfHyperf\AsyncTask\AbstractTask;
use FriendsOfHyperf\AsyncTask\Task;

class FooTask extends AbstractTask
{
    public function handle():void
    {
        var_dump('foo');
    }
}

Task::deliver(new FooTask());

Task::deliver(fn () => var_dump(111));

Donate

If you like them, Buy me a cup of coffee. Alipay | WeChat

Contact

License

MIT