mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-21 15:45:36 +08:00
update to 1.3.0 version totally.
This commit is contained in:
@@ -178,9 +178,10 @@ function context() {
|
||||
if (isset(ZMBuf::$context[$cid])) {
|
||||
return new $c_class($cid);
|
||||
} else {
|
||||
Console::debug("未找到当前协程的上下文($cid),正在找父进程的上下文");
|
||||
while (($pcid = Co::getPcid($cid)) !== -1) {
|
||||
$cid = $pcid;
|
||||
if (isset(ZMBuf::$context[$cid])) return new $c_class($cid);
|
||||
else $cid = $pcid;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user