Thread

php\lang\Thread

Class Thread

Constants


constant MAX_PRIORITY
constant MIN_PRIORITY
constant NORM_PRIORITY

Methods


__construct($runnable, $env = null, $group = null)
Parameters:
getId()
Returns:int
getName()
Returns:string
setName($value)
Parameters:
  • $valuestring
getGroup()
Returns:php\lang\ThreadGroup
isDaemon()
Returns:bool
setDaemon($value)
Parameters:
  • $valuebool
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:
  • $millisint
  • $nanosint
static doYield
static sleep($millis, $nanos = 0)

Causes the currently executing thread to sleep (temporarily cease execution)

Parameters:
  • $millisint
  • $nanosint
static getActiveCount
Returns:int
static current

Get current thread

Returns:php\lang\Thread