public function next() { $coroutine = $this->_coroutine; if ($coroutine->valid()) { \Coroutine::resume($coroutine); } }
public function next() { $coroutine = $this->_coroutine; $taskQueue = static::TASK_QUEUE; if ($coroutine->valid()) { \Coroutine::resume($coroutine); } else { //协程结束自动释放可用链接 $this->release($this); } }
public function next() { if ($this->_coroutine->valid()) { $coValue = $this->_coroutine->current(); if (!$coValue instanceof \Client\Tcp) { \Coroutine::resume($this->_coroutine); $this->sleep(); //当前协程不再监听读事件,则移除读事件 } } }
public function next() { if ($this->_coroutine->valid()) { $coValue = $this->_coroutine->current(); if (!$coValue instanceof \Client\Websocket) { \Coroutine::resume($this->_coroutine); $this->sleep(); //当前协程不再监听读事件,则移除读事件 return false; } else { return true; } } }