- class
Thread
(php\lang\Thread
) - package
std
- source
php/lang/Thread.php
Description
Class Thread
Thread ::
doYield()
- A hint to the scheduler that the current thread is willing to yieldThread ::
sleep()
- Causes the currently executing thread to sleep (temporarily ceaseThread ::
getActiveCount()
Thread ::
current()
- Get current thread
->
__construct()
->
getId()
->
getName()
->
setName()
->
getGroup()
->
isDaemon()
->
setDaemon()
->
isInterrupted()
->
isAlive()
->
start()
- start->
run()
- run->
interrupt()
- Interrupts this thread.->
join()
- Waits at most $millis milliseconds plus
Thread::doYield(): void
A hint to the scheduler that the current thread is willing to yield its current use of a processor. The scheduler is free to ignore this hint.
Thread::sleep(int $millis, int $nanos): void
Causes the currently executing thread to sleep (temporarily cease execution)
Thread::getActiveCount(): int
Thread::current(): Thread
Get current thread
__construct(callable $runnable, php\lang\Environment $env, php\lang\ThreadGroup $group): void
getId(): int
getName(): string
setName(string $value): void
getGroup(): ThreadGroup
isDaemon(): bool
setDaemon(bool $value): void
isInterrupted(): bool
isAlive(): bool
start(): void
start
run(): void
run
interrupt(): void
Interrupts this thread.
join(int $millis, int $nanos): void
Waits at most $millis milliseconds plus $nanos nanoseconds for this thread to die.