Thread¶
-
php\lang\Thread
Class Thread
Constants
Methods
__construct
($runnable, $env = null, $group = null)¶
Parameters:
- $runnable – callable
- $env – php\lang\Environment
- $group – php\lang\ThreadGroup
getId
()¶
Returns: int
getName
()¶
Returns: string
setName
($value)¶
Parameters:
- $value – string
getGroup
()¶
Returns: php\lang\ThreadGroup
isDaemon
()¶
Returns: bool
setDaemon
($value)¶
Parameters:
- $value – bool
isInterrupted
()¶
Returns: bool
isAlive
()¶
Returns: bool
start
()¶
run
()¶
interrupt
()¶
join
($millis = 0, $nanos = 0)¶Waits at most $millis milliseconds plus $nanos nanoseconds for this thread to die.
Parameters:
- $millis – int
- $nanos – int
- static
doYield
¶
- static
sleep
($millis, $nanos = 0)¶Causes the currently executing thread to sleep (temporarily cease execution)
Parameters:
- $millis – int
- $nanos – int
- static
getActiveCount
¶
Returns: int
- static
current
¶Get current thread
Returns: php\lang\Thread