| ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot |
GearmanClient::addTask(PECL gearman >= 0.5.0) GearmanClient::addTask — Add a task to be run in parallel 説明
public GearmanTask GearmanClient::addTask
( string
$function_name
, string $workload
[, mixed &$context
[, string $unique
]] )Adds a task to be run in parallel with other tasks. Call this method for all the tasks to be run in parallel, then call GearmanClient::runTasks() to perform the work. Note that enough workers need to be available for the tasks to all run in parallel. パラメータ
返り値
A GearmanTask object or 例
例1 Basic submission of two tasks
<?php 上の例の出力は、 たとえば以下のようになります。 COMPLETE: 2, Hello World! COMPLETE: 1, !dlroW olleH 例2 Basic submission of two tasks with passing application context
<?php 上の例の出力は、 たとえば以下のようになります。 t2: H.foo:21, Hello World! t1: H:foo:22, !dlroW olleH 参考
|
各種マニュアル:
PHPマニュアル |
PEARマニュアル |
Smarty(英語)マニュアル |
PHP-GTKマニュアル |
「GearmanClient::addTask - Add a task to be run in parallel」をGoogle検索
|