« Threaded::wait
Thread::getCreatorId »

Thread クラス

(PECL pthreads >= 2.0.0)

はじめに

このオブジェクトの start メソッドが呼ばれると、run メソッドのコードが個別のスレッドで並列処理されます。

run メソッドの実行後は Thread はすぐに終了し、作成元のスレッドに適切な時期に join します。

警告

Thread をいつ join させるのかをエンジンに決めさせていると、予期せぬ振る舞いを引き起こすことがあります。 可能な限り、プログラマーが明示的に指定するようにしましょう。

クラス概要

class Thread extends Threaded implements Countable, Traversable, ArrayAccess {
/* メソッド */
public function getCreatorId(): int
public static function getCurrentThread(): Thread
public static function getCurrentThreadId(): int
public function getThreadId(): int
public function isJoined(): bool
public function isStarted(): bool
public function join(): bool
public function start(int $options = ?): bool
/* 継承したメソッド */
public function Threaded::chunk(int $size, bool $preserve): array
public function Threaded::count(): int
public function Threaded::extend(string $class): bool
public function Threaded::isRunning(): bool
public function Threaded::isTerminated(): bool
public function Threaded::merge(mixed $from, bool $overwrite = ?): bool
public function Threaded::notify(): bool
public function Threaded::notifyOne(): bool
public function Threaded::pop(): bool
public function Threaded::run(): void
public function Threaded::shift(): mixed
public function Threaded::synchronized(Closure $block, mixed ...$args): mixed
public function Threaded::wait(int $timeout = ?): bool
}

目次

関連キーワード:
Thread   Threaded   join   mixed   getCreatorId   start   wait   pthreads   スレッド   static   getCurrentThread   getCurrentThreadId   getThreadId   isJoined   isStarted   識別   Identification   検出   コード   個別   並列   作成元   時期   エンジン   予期
関連する関数・ページ:
thread.getcreatorid   thread.getthreadid   thread.join   thread.getcurrentthread   thread.getcurrentthreadid   thread.start