isComplete() public method

public isComplete ( ) : boolean
return boolean
Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function isValid() : \Generator
 {
     while (null !== $this->awaitable) {
         (yield $this->awaitable);
         // Wait until last call has resolved.
     }
     if (null !== $this->placeholder) {
         $this->placeholder->ready();
     }
     try {
         $this->placeholder = $this->queue->pull();
         $this->current = (yield $this->awaitable = $this->placeholder->getAwaitable());
     } catch (\Throwable $exception) {
         $this->current = $exception;
         throw $exception;
     } finally {
         $this->complete = $this->queue->isComplete();
         $this->awaitable = null;
     }
     return !$this->complete;
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function isComplete() : bool
 {
     return $this->queue->isComplete();
 }