low_ghost/phpmultithread

Minimalistic Multithreading with Coroutines

Installs: 372

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:project

pkg:composer/low_ghost/phpmultithread

0.2.1 2015-07-15 01:04 UTC

This package is not auto-updated.

Last update: 2025-10-11 23:01:11 UTC


README

This minimalistic package allows asynchronous multithreading using coroutines and the Symfony/Process component. Coroutine structure based heavily on https://nikic.github.io/2012/12/22/Cooperative-multitasking-using-coroutines-in-PHP.html Basically, for use when you don't have access to reactPhp or other async frameworks, or message queues like Beanstalk or Redis and still want to run non-blocking processes on multiple threads. Supports running php closure functions by passing a closure obj to AsyncTask->create();

See TaskRunnerExample.php for some simple examples.