Ejemplo n.º 1
0
 /**
  * @coroutine
  *
  * Returns a coroutine that is fulfilled when the stream is ready to receive data (output buffer is not full).
  *
  * @param float|int $timeout Number of seconds until the returned promise is rejected with a TimeoutException
  *     if the data cannot be written to the stream. Use null for no timeout.
  *
  * @return \Generator
  *
  * @resolve int Always resolves with 0.
  *
  * @throws \Icicle\Stream\Exception\UnwritableException If the stream is no longer writable.
  * @throws \Icicle\Stream\Exception\ClosedException If the stream has been closed.
  */
 public function await(float $timeout = 0) : \Generator
 {
     return $this->writable->await($timeout);
 }