pthreads Thread 클래스

(PECL pthreads >= 2.0.0)


소개

스레드의 시작 메서드가 호출되면 실행 메서드 코드가 별도의 스레드에서 병렬로 실행됩니다.

run 메소드가 실행된 후 Thread는 즉시 종료되고 적절한 시간에 생성 중인 Thread와 결합됩니다.

경고 스레드가 결합되어야 하는 시기를 결정하기 위해 엔진에 의존하면 바람직하지 않은 동작이 발생할 수 있습니다. 프로그래머는 가능한 경우 명시적이어야 합니다.


클래스 개요

                  
class Thread extends Threaded implements Countable, Traversable, ArrayAccess {

  /* Methods */
  public getCreatorId(): int
  public static getCurrentThread(): Thread
  public static getCurrentThreadId(): int
  public getThreadId(): int
  public isJoined(): bool
  public isStarted(): bool
  public join(): bool
  public start(int $options = ?): bool

  /* Inherited methods */
  public Threaded::chunk(int $size, bool $preserve): array
  public Threaded::count(): int
  public Threaded::extend(string $class): bool
  public Threaded::isRunning(): bool
  public Threaded::isTerminated(): bool
  public Threaded::merge(mixed $from, bool $overwrite = ?): bool
  public Threaded::notify(): bool
  public Threaded::notifyOne(): bool
  public Threaded::pop(): bool
  public Threaded::run(): void
  public Threaded::shift(): mixed
  public Threaded::synchronized(Closure $block, mixed ...$args): mixed
  public Threaded::wait(int $timeout = ?): bool
}
                  
                

목차