예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function reset()
 {
     parent::reset();
     $this->scheduler = new \SplPriorityQueue();
     $this->readStreams = [];
     $this->readWatchers = [];
     $this->writeStreams = [];
     $this->writeWatchers = [];
     $this->signalWatchers = [];
 }
예제 #2
0
 public function testTimeMove()
 {
     $Loop = new Loop(new Object(array(Object::TIME => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10))));
     $Loop->moveTime(2);
     $this->assertEquals(2, $Loop->current(Object::TIME));
     $Loop->moveTime(5);
     $this->assertEquals(7, $Loop->current(Object::TIME));
     $Loop->reset();
     $Loop->moveToTime(7);
     $this->assertEquals(7, $Loop->current(Object::TIME));
     $Loop->moveToTime(10);
     $this->assertEquals(10, $Loop->current(Object::TIME));
 }
예제 #3
0
파일: EvLoop.php 프로젝트: koolkode/async
 /**
  * {@inheritdoc}
  */
 public function reset()
 {
     parent::reset();
     $this->loop->stop();
 }