|
@@ -293,33 +293,30 @@ abstract class ILooper
|
|
|
if($count > 0) {
|
|
|
Swoole\Coroutine::sleep(1);
|
|
|
}
|
|
|
-
|
|
|
Log::record("wait running subcoroutine count = {$count} quit.",Log::DEBUG);
|
|
|
}
|
|
|
while($count > 0);
|
|
|
-
|
|
|
Log::record("wait end subcoroutine quit all",Log::DEBUG);
|
|
|
}
|
|
|
|
|
|
public function run()
|
|
|
{
|
|
|
refill\RefillFactory::instance();
|
|
|
-
|
|
|
$this->_cid = Swoole\Coroutine::getCid();
|
|
|
- Log::record("runloop cid={$this->_cid}",Log::DEBUG);
|
|
|
|
|
|
$queues = $this->mServer->scan();
|
|
|
while (true)
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
+ if ($this->_stop) break;
|
|
|
+
|
|
|
if($this->_pause == 1) {
|
|
|
Log::record("runlooper subcoroutine pause",Log::DEBUG);
|
|
|
$this->_pause = 2;
|
|
|
Swoole\Coroutine::suspend();
|
|
|
Log::record("runlooper subcoroutine resume",Log::DEBUG);
|
|
|
}
|
|
|
- if ($this->_stop) break;
|
|
|
|
|
|
perfor_clear();
|
|
|
if(defined('USE_COROUTINE') && USE_COROUTINE)
|