start() public method

Run the event loop until there are no more tasks to perform.
public start ( )
Exemplo n.º 1
0
 /**
  * @override
  * @inheritDoc
  */
 public function start()
 {
     $this->loop->start();
 }
Exemplo n.º 2
0
 /**
  * @dataProvider loopsProvider
  * @param LoopExtendedInterface|LoopModelInterface|mixed $loop
  */
 public function testApiStartAndApiStop_StartsAndStopsLoop($loop)
 {
     $loop->onAfterTick(function () use($loop) {
         $this->assertTrue($loop->isRunning());
         $loop->stop();
         $this->assertFalse($loop->isRunning());
     });
     $loop->start();
     unset($loop);
 }