colindev/process

php 版子程序處理物

Installs: 21

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/colindev/process

v1.0.1 2015-07-28 02:03 UTC

This package is not auto-updated.

Last update: 2025-10-12 01:36:14 UTC


README

PHP 子程序控制物件

How to use

簡單範例

require __DIR__.'/../vendor/autoload.php';

use Colin\Process\Manager;

$pool = new Manager();

$pool->add($callable_worker, $params);

// 開出子程序跑 $callable_work ...
$p->exec();

// or 如果需要工作程序的回傳值
$p->exec(function($ret){
    // 就是他了...
});

// 主程序繼續往下執行

詳細範例

sample