Results of 1 - 10 of about 29 for Threaded (0.003 sec.)
- The Volatile class | PHP 8.3 12612
- 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
... ility of its Threaded members, and is also used to store PHP arrays in Threaded contexts. クラス概要 class Volatile extends Threaded implements ... Collectable , Traversable { /* 継承したメソッド */ public function Threaded::chunk ( int $size , bool $preserve ): array public function Threaded::count (): int public function Threaded::extend ( st ... ring $class ): bool public function Threaded::isRunning (): bool public function Threaded::isTerminated (): bool public function Threaded::merge ( mixed $from , bool $ ...
-
https://man.mtool.work/php/8.3/class.volatile.html
- The Threaded class | PHP 8.3 11894
- 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
... , provide implicit safety for the programmer; all operations on the object scope are safe. クラス概要 class Threaded implements Collectable , Traversable , Countable , ArrayAccess { /* メソッド */ public function chunk ( int $size , bool $ ... ic function synchronized ( Closure $block , mixed ...$args ): mixed public function wait ( int $timeout = ? ): bool } 目次 Threaded::chunk — Manipulation Threaded::count — Manipulation Threaded::extend — Runtime Manipulation Threaded::isRunning — State D ... etection Threaded::isTerminated — State Detection Threaded::merge — Manipulation Threaded::notify — Synchronization Threaded::notifyOne — Sy ...
-
https://man.mtool.work/php/8.3/class.threaded.html
- Thread クラス | PHP 8.3 11192
- Thread クラス (PECL pthreads >= 2.0.0) はじめに このオブジェクトの start メソッドが呼ばれると、run メソッドのコードが個別のスレッドで並列処理されます。 run メソッドの実行後は Thread はすぐに終了し、作成元のスレッドに適切な時期に join します
... いを引き起こすことがあります。 可能な限り、プログラマーが明示的に指定するようにしましょう。 クラス概要 class Thread extends Threaded implements Countable , Traversable , ArrayAccess { /* メソッド */ public function getCreatorId (): int public static funct ... 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 ( st ... ring $class ): bool public function Threaded::isRunning (): bool public function Threaded::isTerminated (): bool public function Threaded::merge ( mixed $from , bool $ ...
-
https://man.mtool.work/php/8.3/class.thread.html
- pthreads | PHP 8.3 11111
- pthreads はじめに pthreads はオブジェクト指向の API で、PHP でマルチスレッド処理を行うのに必要なすべてのツールを提供します。 PHP アプリケーションで、Thread や Worker そして Threaded を作ったり読み書きしたり実行したりできるようになります。 警
... ションに限られています。 警告 ptheads (v3) は PHP 7.2+ で使えます。 これは ZTS モードが 7.0 と 7.1 では安全でないためです。 Threaded クラスが、pthreads が実行できる機能のもとになります。 このクラスは同期のメソッドとプログラマにとって便利なインタフェイスを ... がスタックに積まれる前に実行されます。 そのため、オブジェクトで必要となるリソースの初期化に使えます。 Pool クラスを使って、 Threaded オブジェクトを分散させるワーカークラスのグループを作ることができます。 複数スレッドを扱う際に最も簡単かつ効率的な方法です。 ... 警告 Pool クラスは Threaded クラスを継承していません。 そして、Pool ベースのオブジェクトは通常の PHP オブジェクトです。 よって、そのインスタンスをコン ...
-
https://man.mtool.work/php/8.3/book.pthreads.html
- Threaded::extend — Runtime Manipulation | PHP 8.3 9120
- Threaded::extend (PECL pthreads >= 2.0.8) Threaded::extend — Runtime Manipulation 説明 public function Threaded::extend ( string $class ): bool Makes thread safe standard class at runtime パラメータ class The class to extend 戻り値 成功した
... 場合に true を、失敗した場合に false を返します。 例 例1 Runtime inheritance <?php class My {} Threaded :: extend ( My ::class); $my = new My (); var_dump ( $my instanceof Threaded ); ?> 上の例の出力は以下となります。 bool(tru ...
-
https://man.mtool.work/php/8.3/threaded.extend.html
- Threaded::pop — Manipulation | PHP 8.3 9006
- Threaded::pop (PECL pthreads >= 2.0.0) Threaded::pop — Manipulation 説明 public function Threaded::pop (): bool Pops an item from the objects property table パラメータ この関数にはパラメータはありません。 戻り値 The last item from the objec
... ts property table 例 例1 Popping the last item from the property table of a threaded object <?php $safe = new Threaded (); while ( count ( $safe ) < 10 ) $safe [] = count ( $safe ); var_dump ( $safe -> pop ( ...
-
https://man.mtool.work/php/8.3/threaded.pop.html
- Threaded::shift — Manipulation | PHP 8.3 9006
- Threaded::shift (PECL pthreads >= 2.0.0) Threaded::shift — Manipulation 説明 public function Threaded::shift (): mixed Shifts an item from the objects property table パラメータ この関数にはパラメータはありません。 戻り値 The first item from
... the objects property table 例 例1 Shifting the first item from the property table of a threaded object <?php $safe = new Threaded (); while ( count ( $safe ) < 10 ) $safe [] = count ( $safe ); var_dump ( $safe -> shift ...
-
https://man.mtool.work/php/8.3/threaded.shift.html
- Threaded::merge — Manipulation | PHP 8.3 8761
- Threaded::merge (PECL pthreads >= 2.0.0) Threaded::merge — Manipulation 説明 public function Threaded::merge ( mixed $from , bool $overwrite = ? ): bool Merges data into the current object パラメータ from The data to merge overwrite Overwri
... default true 戻り値 成功した場合に true を、失敗した場合に false を返します。 例 例1 Merging into the property table of a threaded object <?php $array = []; while ( count ( $array ) < 10 ) $array [] = count ( $array ); $stdClass = new stdClass (); $stdC ... lass -> foo = "foo" ; $stdClass -> bar = "bar" ; $stdClass -> baz = "baz" ; $safe = new Threaded (); $safe -> merge ( $array ); $safe -> foo = "bar" ; $safe -> merge ( $stdClass , false ); var_dump ( $safe ); ?> 上の例の ... 出力は以下となります。 object(Threaded)#2 (13) { ["0"]=> int(0) ["1"]=> int(1) ["2"]=> int(2) ["3"]=> int(3) ["4"]=> int(4) ["5"]=> int(5) ["6"]=> int(6) ["7"]=> ...
-
https://man.mtool.work/php/8.3/threaded.merge.html
- Threaded::count — Manipulation | PHP 8.3 8500
- Threaded::count (PECL pthreads >= 2.0.0) Threaded::count — Manipulation 説明 public function Threaded::count (): int Returns the number of properties for this object パラメータ この関数にはパラメータはありません。 戻り値 例 例1 Counting the
... properties of an object <?php $safe = new Threaded (); while ( count ( $safe ) < 10 ) { $safe [] = count ( $safe ); } var_dump ( count ( $safe )); ?> 上の例の出力は以下となり ...
-
https://man.mtool.work/php/8.3/threaded.count.html
- Threaded::chunk — Manipulation | PHP 8.3 8223
- Threaded::chunk (PECL pthreads >= 2.0.0) Threaded::chunk — Manipulation 説明 public function Threaded::chunk ( int $size , bool $preserve ): array Fetches a chunk of the objects property table of the given size, optionally preserving keys パ
... alse 戻り値 An array of items from the objects property table 例 例1 Fetch a chunk of the property table <?php $safe = new Threaded (); while ( count ( $safe ) < 10 ) { $safe [] = count ( $safe ); } var_dump ( $safe -> chunk ( 5 )); ?> 上の例の出力は以下 ...
-
https://man.mtool.work/php/8.3/threaded.chunk.html