spork

Experimental library for forking PHP

  • 所有者: kriswallsmith/spork
  • 平台:
  • 许可证: MIT License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

Build Status

Spork: PHP on a Fork

<?php

$manager = new Spork\ProcessManager();
$manager->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";
});

Example: Upload images to your CDN

Feed an iterator into the process manager and it will break the job into
multiple batches and spread them across many processes.

<?php

$files = new RecursiveDirectoryIterator('/path/to/images');
$files = new RecursiveIteratorIterator($files);

$manager->process($files, function(SplFileInfo $file) {
    // upload this file
});

主要指标

概览
名称与所有者kriswallsmith/spork
主编程语言PHP
编程语言PHP (语言数: 1)
平台
许可证MIT License
所有者活动
创建于2012-04-10 03:31:04
推送于2016-03-17 13:22:16
最后一次提交2015-05-18 12:16:02
发布数3
最新版本名称v0.3 (发布于 )
第一版名称v0.1 (发布于 )
用户参与
星数586
关注者数33
派生数52
提交数99
已启用问题?
问题数25
打开的问题数16
拉请求数7
打开的拉请求数8
关闭的拉请求数4
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?