3 ms·
> 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.
by 10098 14y ago
> 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.
- rythie 14y agoA threading system doesn't help you with that, the web request will have died by then. Use a queuing system if you want to do that, just as you should do in other languages.
- 1SaltwaterC 14y agoI 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 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.