PHP Class Kraken\Loop\Tick\TickContinousQueue

Afficher le fichier Open project: kraken-php/framework Class Usage Examples

Protected Properties

Свойство Type Description
$loop Kraken\Loop\LoopModelInterface
$queue SplQueue

Méthodes publiques

Méthode Description
__construct ( Kraken\Loop\LoopModelInterface $loop )
__destruct ( )
add ( callable $listener ) Add a callback to be invoked on the next tick of the event loop.
isEmpty ( ) : boolean Check if the next tick queue is empty.
tick ( ) Flush the callback queue.

Method Details

__construct() public méthode

public __construct ( Kraken\Loop\LoopModelInterface $loop )
$loop Kraken\Loop\LoopModelInterface

__destruct() public méthode

public __destruct ( )

add() public méthode

Callbacks are guaranteed to be executed in the order they are enqueued, before any timer or stream events.
public add ( callable $listener )
$listener callable

isEmpty() public méthode

Check if the next tick queue is empty.
public isEmpty ( ) : boolean
Résultat boolean

tick() public méthode

Invokes callbacks which were on the queue when tick() was called and newly added ones.
public tick ( )

Property Details

$loop protected_oe property

protected LoopModelInterface,Kraken\Loop $loop
Résultat Kraken\Loop\LoopModelInterface

$queue protected_oe property

protected SplQueue $queue
Résultat SplQueue