We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given a sequence of elements I would like to be able to spawn workers and relay work to them.
$thumbs= new Folder('thumbs'); Sequence::of(new IOCollectionIterator('.', true)) ->filter(new ExtensionEqualsFilter('.jpg')) ->each(function($e) use($thumbs) { $image= Image::loadFrom(new JpegStreamReader($e->getInputStream())); $thumb= Image::create(400, 300); $thumb->resampleFrom($image); $thumb->saveTo(new JpegStreamWriter((new File($thumbs, $e->getName())->out()); })) ;
The text was updated successfully, but these errors were encountered:
$worker= function() { return Runtime::getInstance()->newInstance( null, 'class', 'com.example.ResampleTo', ['--files-from=-', $thumbs->getUri()] ); }; Sequence::of(new IOCollectionIterator('.', true)) ->filter(new ExtensionEqualsFilter('.jpg')) ->distribute(new Evenly(4), $worker, function($process, $e) { $process->in->write($e->getUri()); }) ->wait() });
Sorry, something went wrong.
No branches or pull requests
Given a sequence of elements I would like to be able to spawn workers and relay work to them.
The text was updated successfully, but these errors were encountered: