Forker 为 PHP 提供了简单的分叉接口。
github.com/olezhikz/forker
源代码
安装: 10
依赖: 1
建议者: 0
安全性: 0
星星: 1
关注者: 0
分支: 3
Requires
None
Requires (Dev)
Suggests
Provides
Conflicts
Replaces
MIT 751317359717fb10490c48cfab66b09571f57da0
This package is auto-updated.
Last update: 2024-09-25 07:04:13 UTC
如果您需要并行执行多个任务并收集其结果,这将是最简单的方法。
$things = array($thing1, $thing2); $results = Forker::map($things, function ($index, $thing) { // Some expensive operation return calculateNewThing($thing); });