PHP Class Thread, ClearSky

Inheritance: extends BaseThread, implements HistoricalObjectI
显示文件 Open project: robske110/ClearSky Class Usage Examples

Public Methods

Method Description
getCreatorId ( ) : integer Will return the identity of the Thread that created the referenced Thread
getCurrentThread ( ) : static Will return the instance of currently executing thread
getCurrentThreadId ( ) : integer Will return the identity of the currently executing thread
getThreadId ( ) : integer Will return the identity of the referenced Thread
isJoined ( ) : boolean Tell if the referenced Thread has been joined by another context
isStarted ( ) : boolean Tell if the referenced Thread has been started
join ( ) : boolean Causes the calling context to wait for the referenced Thread to finish executing
start ( integer $options = PTHREADS_INHERIT_ALL ) : boolean Will start a new Thread to execute the implemented run method

Method Details

getCreatorId() public method

Will return the identity of the Thread that created the referenced Thread
public getCreatorId ( ) : integer
return integer A numeric identity

getCurrentThread() public static method

Will return the instance of currently executing thread
public static getCurrentThread ( ) : static
return static

getCurrentThreadId() public static method

Will return the identity of the currently executing thread
public static getCurrentThreadId ( ) : integer
return integer

getThreadId() public method

Will return the identity of the referenced Thread
public getThreadId ( ) : integer
return integer

isJoined() public method

Tell if the referenced Thread has been joined by another context
public isJoined ( ) : boolean
return boolean A boolean indication of state

isStarted() public method

Tell if the referenced Thread has been started
public isStarted ( ) : boolean
return boolean A boolean indication of state

join() public method

Causes the calling context to wait for the referenced Thread to finish executing
public join ( ) : boolean
return boolean A boolean indication of state

start() public method

Will start a new Thread to execute the implemented run method
public start ( integer $options = PTHREADS_INHERIT_ALL ) : boolean
$options integer An optional mask of inheritance constants, by default PTHREADS_INHERIT_ALL
return boolean A boolean indication of success