Closed twose closed 5 years ago
协程之间并没有实质上的持续父子关系, 协程之间是相互隔离, 独立运作的 此Pcid可理解为创建了当前协程的协程id
go(function () {
go(function () {
$ptrace = Co::getBackTrace(Co::getPcid());
// balababala
var_dump(array_merge($ptrace, Co::getBackTrace(Co::getCid())));
});
});
Co::getPcid
输出
Co::exist
Implemented in: https://github.com/swoole/swoole-src/commit/6812049a1cd478535ed94025a96884ee34d0016c https://github.com/swoole/swoole-src/commit/1884d60fe6af880ef781399a4544014128f02ac7