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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?