コード例 #1
0
ファイル: SelectLoop.php プロジェクト: kanzuka/icicle
 /**
  * {@inheritdoc}
  */
 public function clear()
 {
     parent::clear();
     if (null !== $this->signalTimer) {
         $this->signalTimer->stop();
         $this->signalTimer = $this->timer($this->signalTimer->getInterval(), true, [$this->signalManager, 'tick']);
         $this->signalTimer->unreference();
     }
 }
コード例 #2
0
ファイル: Environment.php プロジェクト: Nik-ADA/concurrent
    /**
     * Removes all values.
     */
    public function clear()
    {
        $this->data = [];
        $this->expire = [];
        $this->ttl = [];

        $this->timer->stop();
        $this->queue = new \SplPriorityQueue();
    }