Re: Boost performance with parallel processing
Saturday, January 31st, 2009Martin Roest posted an article about parallel processing. Here’s a more reusable version of the code, OOP style:
Usage with callback function:
< ?php $pc = new ProcessController(10); $pc->process($documents, 'processDocument'); ?>
It supports static method callbacks:
$pc->process($documents, array('DocumentProcessor', 'processDocument'));
And callbacks on an instance of an object:
$pc->process($documents, array($documentProcessor, 'processDocument'));