用于分支 PHP 的实验性库
fork(function() {
// do something in another process!
return 'Hello from '.getmypid();
})->then(function(Spork\Fork $fork) {
// do something in the parent process when it's done!
echo "{$fork->getPid()} says '{$fork->getResult()}'\n";
});
Feed an iterator into the process manager and it will break the job into multiple batches and spread them across many processes.
process($files, function(SplFileInfo $file) {
// upload this file
});
暂无开放 Issues,或尚未同步最近议题。