jimbojsb/workman

PHP process forking & daemonizing library

v0.2.1 2018-06-07 15:17 UTC

This package is auto-updated.

Last update: 2024-10-18 06:03:11 UTC


README

Build Status

<?php
require_once __DIR__ . '/vendor/autoload.php';
$callback = function($arg1) {
    echo getmypid() . ": " . $arg1 . "\n";
};

$callbackQueue = new Workman\CallbackQueue($callback);
for ($c = 0; $c < 100000; $c++) {
    $callbackQueue->push([$c]);
}
$callbackQueue->work(7);