« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 11 for synchronized (0.001 sec.)
Threaded::synchronized — Synchronization | PHP 8.3 13656
Threaded::synchronized (PECL pthreads >= 2.0.0) Threaded::synchronized — Synchronization 説明 public function Threaded::synchronized ( Closure $block , mixed ...$args ): mixed Executes the block while retaining the referenced objects synchr ... り値 The return value from the block 例 例1 Synchronizing <?php class My extends Thread { public function run () { $this -> synchronized (function( $thread ){ if (! $thread -> done ) $thread -> wait (); }, $this ); } } $my = new My (); $my -> start (); $my -> ... synchronized (function( $thread ){ $thread -> done = true ; $thread -> notify (); }, $my ); var_dump ( $my -> join ()); ?> 上の例の出力 ...
https://man.mtool.work/php/8.3/threaded.synchronized.html
Threaded::isRunning — State Detection | PHP 8.3 9299
Threaded::isRunning (PECL pthreads >= 2.0.0) Threaded::isRunning — State Detection 説明 public function Threaded::isRunning (): bool Tell if the referenced object is executing パラメータ この関数にはパラメータはありません。 戻り値 A boolean ... method 例 例1 Detect the state of the referenced object <?php class My extends Thread { public function run () { $this -> synchronized (function( $thread ){ if (! $thread -> done ) $thread -> wait (); }, $this ); } } $my = new My (); $my -> start (); var_du ... mp ( $my -> isRunning ()); $my -> synchronized (function( $thread ){ $thread -> done = true ; $thread -> notify (); }, $my ); ?> 上の例の出力は以下となります。 bool(true ...
https://man.mtool.work/php/8.3/thread.isrunning.html
The Threaded class | PHP 8.3 9193
The Threaded class (PECL pthreads >= 2.0.0) はじめに Threaded objects form the basis of pthreads ability to execute user code in parallel; they expose synchronization methods and various useful interfaces. Threaded objects, most importantly ... tifyOne (): bool public function pop (): bool public function run (): void public function shift (): mixed public function synchronized ( Closure $block , mixed ...$args ): mixed public function wait ( int $timeout = ? ): bool } 目次 Threaded::chunk — Manipu ... otifyOne — Synchronization Threaded::pop — Manipulation Threaded::run — Execution Threaded::shift — Manipulation Threaded::synchronized — Synchronization Threaded::wait — Synchronization 他のマニュアルの関連ページ Python chunk Linux JM pthreads(7) Linux JM w ...
https://man.mtool.work/php/8.3/class.threaded.html
Thread::isJoined — 状態を検出する | PHP 8.3 9193
Thread::isJoined (PECL pthreads >= 2.0.0) Thread::isJoined — 状態を検出する 説明 public function Thread::isJoined (): bool このスレッドが同期されているかどうかを調べます。 パラメータ この関数にはパラメータはありません。 戻り値 成功した場合に ... 場合に false を返します。 例 例1 スレッドの状態を検出する <?php class My extends Thread { public function run () { $this -> synchronized (function( $thread ){ if (! $thread -> done ) $thread -> wait (); }, $this ); } } $my = new My (); $my -> start (); var_du ... mp ( $my -> isJoined ()); $my -> synchronized (function( $thread ){ $thread -> done = true ; $thread -> notify (); }, $my ); ?> 上の例の出力は以下となります。 bool(fals ...
https://man.mtool.work/php/8.3/thread.isjoined.html
Threaded::notify — Synchronization | PHP 8.3 9193
Threaded::notify (PECL pthreads >= 2.0.0) Threaded::notify — Synchronization 説明 public function Threaded::notify (): bool Send notification to the referenced object パラメータ この関数にはパラメータはありません。 戻り値 成功した場合に tru ... ifications and Waiting <?php class My extends Thread { public function run () { /** cause this thread to wait **/ $this -> synchronized (function( $thread ){ if (! $thread -> done ) $thread -> wait (); }, $this ); } } $my = new My (); $my -> start (); /** se ... nd notification to the waiting thread **/ $my -> synchronized (function( $thread ){ $thread -> done = true ; $thread -> notify (); }, $my ); var_dump ( $my -> join ()); ?> 上の例の出力 ...
https://man.mtool.work/php/8.3/threaded.notify.html
Threaded::wait — Synchronization | PHP 8.3 9193
Threaded::wait (PECL pthreads >= 2.0.0) Threaded::wait — Synchronization 説明 public function Threaded::wait ( int $timeout = ? ): bool Will cause the calling context to wait for notification from the referenced object パラメータ timeout An ... ifications and Waiting <?php class My extends Thread { public function run () { /** cause this thread to wait **/ $this -> synchronized (function( $thread ){ if (! $thread -> done ) $thread -> wait (); }, $this ); } } $my = new My (); $my -> start (); /** se ... nd notification to the waiting thread **/ $my -> synchronized (function( $thread ){ $thread -> done = true ; $thread -> notify (); }, $my ); var_dump ( $my -> join ()); ?> 上の例の出力 ...
https://man.mtool.work/php/8.3/threaded.wait.html
Threaded::notifyOne — Synchronization | PHP 8.3 9086
Threaded::notifyOne (PECL pthreads >= 3.0.0) Threaded::notifyOne — Synchronization 説明 public function Threaded::notifyOne (): bool Send notification to the referenced object. This unblocks at least one of the blocked threads (as opposed t ... ifications and Waiting <?php class My extends Thread { public function run () { /** cause this thread to wait **/ $this -> synchronized (function( $thread ){ if (! $thread -> done ) $thread -> wait (); }, $this ); } } $my = new My (); $my -> start (); /** se ... nd notification to the waiting thread **/ $my -> synchronized (function( $thread ){ $thread -> done = true ; $thread -> notifyOne (); }, $my ); var_dump ( $my -> join ()); ?> 上の例の出 ...
https://man.mtool.work/php/8.3/threaded.notifyone.html
Thread クラス | PHP 8.3 7557
Thread クラス (PECL pthreads >= 2.0.0) はじめに このオブジェクトの start メソッドが呼ばれると、run メソッドのコードが個別のスレッドで並列処理されます。 run メソッドの実行後は Thread はすぐに終了し、作成元のスレッドに適切な時期に join します ... d::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::getCre ...
https://man.mtool.work/php/8.3/class.thread.html
The Volatile class | PHP 8.3 7557
The Volatile class (PECL pthreads >= 3.0.0) はじめに The Volatile class is new to pthreads v3. Its introduction is a consequence of the new immutability semantics of Threaded members of Threaded classes. The Volatile class enables for mutab ... d::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 } 例 例1 New immutabi ...
https://man.mtool.work/php/8.3/class.volatile.html
pthreads | PHP 8.3 7006
pthreads はじめに pthreads はオブジェクト指向の API で、PHP でマルチスレッド処理を行うのに必要なすべてのツールを提供します。 PHP アプリケーションで、Thread や Worker そして Threaded を作ったり読み書きしたり実行したりできるようになります。 警 ... otifyOne — Synchronization Threaded::pop — Manipulation Threaded::run — Execution Threaded::shift — Manipulation Threaded::synchronized — Synchronization Threaded::wait — Synchronization Thread — Thread クラス Thread::getCreatorId — 識別 Thread::getCurrentTh ...
https://man.mtool.work/php/8.3/book.pthreads.html
PREV 1 2 NEXT