Thread
May 1, 2018 ยท View on GitHub
- class
Thread(php\lang\Thread) - package
std - source
php/lang/Thread.php
Description
Class Thread
Static Methods
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
Methods
->__construct()->getId()->getName()->setName()->getGroup()->isDaemon()->setDaemon()->isInterrupted()->isAlive()->start()- start->run()- run->interrupt()- Interrupts this thread.->join()- Waits at most $millis milliseconds plus
Static Methods
doYield()
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.
sleep()
Thread::sleep(int $millis, int $nanos): void
Causes the currently executing thread to sleep (temporarily cease execution)
getActiveCount()
Thread::getActiveCount(): int
current()
Thread::current(): Thread
Get current thread
Methods
__construct()
__construct(callable $runnable, php\lang\Environment $env, php\lang\ThreadGroup $group): void
getId()
getId(): int
getName()
getName(): string
setName()
setName(string $value): void
getGroup()
getGroup(): ThreadGroup
isDaemon()
isDaemon(): bool
setDaemon()
setDaemon(bool $value): void
isInterrupted()
isInterrupted(): bool
isAlive()
isAlive(): bool
start()
start(): void
start
run()
run(): void
run
interrupt()
interrupt(): void
Interrupts this thread.
join()
join(int $millis, int $nanos): void
Waits at most nanos nanoseconds for this thread to die.