PHP 클래스 Worker, ClearSky

상속: extends Base
파일 보기 프로젝트 열기: robske110/ClearSky 1 사용 예제들

공개 메소드들

메소드 설명
collect ( callable $function ) : void Collects finished objects
collector ( Collectable $collectable )
getStacked ( ) : integer Returns the number of threaded tasks waiting to be executed by the referenced Worker
isShutdown ( ) : boolean Tell if the referenced Worker has been shutdown
shutdown ( ) : boolean Shuts down the Worker after executing all the threaded tasks previously stacked
stack ( Collectable &$work ) : integer Appends the referenced object to the stack of the referenced Worker
unstack ( ) : integer Removes the first item from the stack

메소드 상세

collect() 공개 메소드

Collects finished objects
public collect ( callable $function ) : void
$function callable
리턴 void

collector() 공개 메소드

public collector ( Collectable $collectable )
$collectable Collectable

getStacked() 공개 메소드

Returns the number of threaded tasks waiting to be executed by the referenced Worker
public getStacked ( ) : integer
리턴 integer An integral value

isShutdown() 공개 메소드

Tell if the referenced Worker has been shutdown
public isShutdown ( ) : boolean
리턴 boolean A boolean indication of state

shutdown() 공개 메소드

Shuts down the Worker after executing all the threaded tasks previously stacked
public shutdown ( ) : boolean
리턴 boolean A boolean indication of success

stack() 공개 메소드

Appends the referenced object to the stack of the referenced Worker
public stack ( Collectable &$work ) : integer
$work Collectable Collectable object to be executed by the referenced Worker
리턴 integer The new length of the stack

unstack() 공개 메소드

Removes the first item from the stack
public unstack ( ) : integer
리턴 integer The new length of the stack