Exemplo n.º 1
0
 /**
  * Destroys the UV loop handle when the loop is destroyed.
  */
 public function __destruct()
 {
     if (is_resource($this->loopHandle)) {
         \uv_loop_delete($this->loopHandle);
         $this->loopHandle = null;
     }
 }
Exemplo n.º 2
0
 /**
  * @codeCoverageIgnore
  */
 public function __destruct()
 {
     $this->reset();
     if (\is_resource($this->loop)) {
         \uv_loop_delete($this->loop);
     }
 }
Exemplo n.º 3
0
 /**
  * Stops the loop (mainly in case the loop would have been run infinitely)
  *
  * @param int|null $signal
  * @return LoopInterface
  */
 public function stop($signal = null)
 {
     if ($this->loop !== \uv_default_loop()) {
         \uv_loop_delete($this->loop);
     }
     return $this;
 }