Reputation: 1911
I want to run multiple instances of the following script parallel:
for($i = 0; $i < 1000; ) {
echo "It works! Woohoo.<br/>";
sleep(1);
flush();
ob_flush();
}
I have included the httpd-mpm.conf in Apache's httd.conf, but it still doesn't work. I'am using WAMP with Windows7. Is there a way to get this working?
Thanks!
Upvotes: 0
Views: 534
Reputation: 4128
PHP is single threaded, but there are some tricks to get multiple threads in order to offload heavy tasks to the background. One is to use Gearman, another is to use the new events introduced in PHP 5.4.
Upvotes: 3