The async task component for Hyperf.
composer require friendsofhyperf/async-task
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));