运行优先级如下:
疑问:这样的执行顺序,为了status 命令去查看是否有业务阻塞?
if (!$this->scheduler->isEmpty()) {
$this->tick();
}
foreach ($read as $fd) {
$fdKey = (int)$fd;
if (isset($this->readEvents[$fdKey])) {
$this->readEvents[$fdKey]($fd);
}
}
foreach ($write as $fd) {
$fdKey = (int)$fd;
if (isset($this->writeEvents[$fdKey])) {
$this->writeEvents[$fdKey]($fd);
}
}
foreach ($except as $fd) {
$fdKey = (int)$fd;
if (isset($this->exceptEvents[$fdKey])) {
$this->exceptEvents[$fdKey]($fd);
}
}
if (!empty($this->signalEvents)) {
// Calls signal handlers for pending signals
pcntl_signal_dispatch();
}
业务系统必然业务优先.
应该是你说的这样。
感谢