Skip to content

Commit

Permalink
fixed: 不在支持使用短命名函数
Browse files Browse the repository at this point in the history
  • Loading branch information
bingcool committed Jul 2, 2023
1 parent 74aa81f commit 88aa440
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Test/Task/TestTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function doRun(array $taskData)
var_dump('Task Process Find Db Result as:');
print_r($result);

$cid = \Co::getCid();
$cid = \Swoole\Coroutine::getCid();
$db1 = $this->get('db');
var_dump("协程Cid={$cid}, Db spl_object_id=".spl_object_id($db).', spl_object_id='.spl_object_id($db1));

Expand All @@ -35,7 +35,7 @@ public function doRun(array $taskData)
// registerApp闭包里面必须通过这样的组件获取组件实例
$db = $this->get('db');
$db1 = $this->get('db');
$cid = \Co::getCid();
$cid = \Swoole\Coroutine::getCid();

var_dump("协程1-Cid={$cid}, Db spl_object_id=".spl_object_id($db).', spl_object_id='.spl_object_id($db1));

Expand All @@ -44,7 +44,7 @@ public function doRun(array $taskData)
// registerApp闭包里面必须通过这样的组件获取组件实例
$db = Application::getApp()->get('db');
$db1 = $this->get('db');
$cid = \Co::getCid();
$cid = \Swoole\Coroutine::getCid();
var_dump("协程2-Cid={$cid}, Db spl_object_id=".spl_object_id($db).', spl_object_id='.spl_object_id($db1));
});
});
Expand Down

0 comments on commit 88aa440

Please sign in to comment.