PHP 클래스 Kraken\Loop\Tick\TickFiniteQueue

파일 보기 프로젝트 열기: kraken-php/framework 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$loop Kraken\Loop\LoopModelInterface
$queue SplQueue

공개 메소드들

메소드 설명
__construct ( Kraken\Loop\LoopModelInterface $loop )
__destruct ( )
add ( callable $listener ) Add a callback to be invoked on a future tick of the event loop.
isEmpty ( ) : boolean Check if the next tick queue is empty.
tick ( ) Flush the callback queue.

메소드 상세

__construct() 공개 메소드

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

__destruct() 공개 메소드

public __destruct ( )

add() 공개 메소드

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() 공개 메소드

Check if the next tick queue is empty.
public isEmpty ( ) : boolean
리턴 boolean

tick() 공개 메소드

Invokes as many callbacks as were on the queue when tick() was called.
public tick ( )

프로퍼티 상세

$loop 보호되어 있는 프로퍼티

protected LoopModelInterface,Kraken\Loop $loop
리턴 Kraken\Loop\LoopModelInterface

$queue 보호되어 있는 프로퍼티

protected SplQueue $queue
리턴 SplQueue