easy-swoole / easyswoole

swoole,easyswoole,swoole framework
https://www.easyswoole.com/
Apache License 2.0
4.74k stars 510 forks source link

easyswoole3.1.16-dev中TaskManager无法投递任务。 #173

Closed teevil closed 5 years ago

teevil commented 5 years ago

这样写,任务无法投递 TaskManager::async( Message::class ); 这样写,任务可以投递并运行任务。 TaskManager::async( Message::class, function(){} ); Message.php `<?php namespace App\HttpController\Api\Task; use EasySwoole\EasySwoole\Swoole\Task\AbstractAsyncTask; class Message extends AbstractAsyncTask { protected function run($taskData, $taskId, $fromWorkerId, $flags = null) { echo "异步任务开始\n"; return true; }

protected function finish($result, $task_id)
{
    echo "异步任务结束\n";
}

}`

kiss291323003 commented 5 years ago

这是swoole底层的一个问题。请升级到4.3.0的swoole