Kraken\Loop\Tick\TickContinousQueue::add PHP Method

add() public method

Callbacks are guaranteed to be executed in the order they are enqueued, before any timer or stream events.
public add ( callable $listener )
$listener callable
    public function add(callable $listener)
    {
        $this->queue->enqueue($listener);
    }

Usage Example

Example #1
0
 /**
  * @override
  * @inheritDoc
  */
 public function onBeforeTick(callable $listener)
 {
     $this->nextTickQueue->add($listener);
 }