Skip to content

Latest commit

 

History

History
202 lines (142 loc) · 2.97 KB

Thread.md

File metadata and controls

202 lines (142 loc) · 2.97 KB

Thread

  • 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 yield
  • Thread ::sleep() - Causes the currently executing thread to sleep (temporarily cease
  • Thread ::getActiveCount()
  • Thread ::current() - Get current thread

Methods


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 $millis milliseconds plus $nanos nanoseconds for this thread to die.