update to 1.3.0 version totally.

This commit is contained in:
whale
2020-05-08 16:37:38 +08:00
parent a1b013ee53
commit acb4bdf9b4
19 changed files with 425 additions and 171 deletions

View File

@@ -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;
}