|
@@ -295,6 +295,14 @@ abstract class ILooper
|
|
|
$pcid = Swoole\Coroutine::getPcid($cid);
|
|
|
if($pcid == $this->_cid) {
|
|
|
$count += 1;
|
|
|
+ $time_secs = Swoole\Coroutine::getElapsed([$cid]);
|
|
|
+ $backtrace = Swoole\Coroutine::getBackTrace($cid);
|
|
|
+
|
|
|
+ $trace = "wait Coroutine quit tim={$time_secs}\n";
|
|
|
+ foreach ($backtrace as $item) {
|
|
|
+ $trace .= "{$item['file']}\t{$item['line']}\t{$item['function']}\n";
|
|
|
+ }
|
|
|
+ Log::record($trace,Log::DEBUG);
|
|
|
}
|
|
|
}
|
|
|
|