Results of 1 - 5 of about 5 for getCurrentThreadID (0.003 sec.)
- Thread::getCurrentThreadId — Identification | PHP 8.3 12759
- Thread::getCurrentThreadId (PECL pthreads >= 2.0.0) Thread::getCurrentThreadId — Identification 説明 public static function Thread::getCurrentThreadId (): int Will return the identity of the currently executing Thread パラメータ この関数には
... ing Thread <?php class My extends Thread { public function run () { printf ( "%s is Thread #%lu\n" , __CLASS__ , Thread :: getCurrentThreadId ()); } } $my = new My (); $my -> start (); ?> 上の例の出力は以下となります。 My is Thread #123456778899 他のマニュアルの関 ...
-
https://man.mtool.work/php/8.3/thread.getcurrentthreadid.html
- Thread クラス | PHP 8.3 9063
- Thread クラス (PECL pthreads >= 2.0.0) はじめに このオブジェクトの start メソッドが呼ばれると、run メソッドのコードが個別のスレッドで並列処理されます。 run メソッドの実行後は Thread はすぐに終了し、作成元のスレッドに適切な時期に join します
... メソッド */ 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 fu ... aded::wait ( int $timeout = ? ): bool } 目次 Thread::getCreatorId — 識別 Thread::getCurrentThread — Identification Thread::getCurrentThreadId — Identification Thread::getThreadId — 識別 Thread::isJoined — 状態を検出する Thread::isStarted — 状態を検出する Thread::j ...
-
https://man.mtool.work/php/8.3/class.thread.html
- Pool::submitTo — Submits a task to a specific worker for execution | PHP 8.3 8236
- Pool::submitTo (PECL pthreads >= 2.0.0) Pool::submitTo — Submits a task to a specific worker for execution 説明 public function Pool::submitTo ( int $worker , Threaded $task ): int Submit a task to the specified worker in the pool. The work
... 例1 Submitting tasks to a specific worker <?php class Task extends Threaded { public function run () { var_dump ( Thread :: getCurrentThreadID ()); } } $pool = new Pool ( 2 ); $pool -> submit (new Task ()); for ( $i = 0 ; $i < 5 ; ++ $i ) { $pool -> submitTo ( 0 , ...
-
https://man.mtool.work/php/8.3/pool.submitTo.html
- Worker クラス | PHP 8.3 8144
- Worker クラス (PECL pthreads >= 2.0.0) はじめに ワーカースレッドには永続コンテキストがあり、たいていの場合はスレッドに対して使えます。 ワーカーを開始させると run メソッドを実行しますが、以下のいずれかの条件を満たすまでスレッドは終了しません
... ion Thread::getCreatorId (): int public static function Thread::getCurrentThread (): Thread public static function Thread::getCurrentThreadId (): int public function Thread::getThreadId (): int public function Thread::isJoined (): bool public function Thread::isSt ...
-
https://man.mtool.work/php/8.3/class.worker.html
- pthreads | PHP 8.3 7684
- pthreads はじめに pthreads はオブジェクト指向の API で、PHP でマルチスレッド処理を行うのに必要なすべてのツールを提供します。 PHP アプリケーションで、Thread や Worker そして Threaded を作ったり読み書きしたり実行したりできるようになります。 警
... ait — Synchronization Thread — Thread クラス Thread::getCreatorId — 識別 Thread::getCurrentThread — Identification Thread::getCurrentThreadId — Identification Thread::getThreadId — 識別 Thread::isJoined — 状態を検出する Thread::isStarted — 状態を検出する Thread::j ...
-
https://man.mtool.work/php/8.3/book.pthreads.html
PREV
1
NEXT