onStop() public method

Callbacks are guarenteed to be executed in the order they are enqueued.
public onStop ( callable $listener )
$listener callable
Ejemplo n.º 1
0
 /**
  * @override
  * @inheritDoc
  */
 public function onStop(callable $listener)
 {
     $this->loop->onStop($listener);
 }
Ejemplo n.º 2
0
 /**
  * @dataProvider loopsProvider
  * @param LoopExtendedInterface|LoopModelInterface|mixed $loop
  */
 public function testApiOnStop_AddsActiveHandler_OnStop($loop)
 {
     $loop->onAfterTick(function () use($loop) {
         $loop->stop();
     });
     $loop->onStop($this->expectCallableOnce());
     $loop->start();
     unset($loop);
 }