Re:PHP solves problems. Oh, and you can program with it too
by rythie on Friday June 29, 2012 @08:23PM
(#4179904)
Why would you want multithreading in PHP? If you require multiple remote I/O there is Curl. If you require more than one CPU per web request you most likely doing something wrong. Multithreaded code is hard to get write, hard to code and hard to debug and not suitable for generating webpages. In case you haven't guessed I think it's actually a benefit it doesn't have that feature, it stops people doing something silly that PHP is not designed for.
[ Parent
| on HN ]
Re:PHP solves problems. Oh, and you can program with it too
by 10098 on Friday June 29, 2012 @08:28PM
(#4179919)
> Why would you want multithreading in PHP?
To not write cron jobs that get triggered every n minutes to do some potentially time-consuming tasks, for example.
Re:PHP solves problems. Oh, and you can program with it too
by 1SaltwaterC on Monday July 02, 2012 @03:14AM
(#4187722)
I wish one day people would stop using mod_php5 and start using PHP-FPM. That way we might get proper documentation and support. fastcgi_finish_request() does the neat thing of finishing the request in the user side, but continuing to do the work in the server side: http://php.net/manual/en/install.fpm.php Must be used with care in an environment that uses a fixed number of processes per pool since it may be DoS'ed.