Re: Multi-thread programming in PHP?
| From: | Dave Mertens | Date: | Wed, 17 Apr 2002 13:19:48 +0000 |
| Subject: | Re: Multi-thread programming in PHP? | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-82893@lists.php.net to get a copy of this message | ||
On Wed, Apr 17, 2002 at 01:26:05PM +0300, Topi Maenpaa wrote:
> Are there any plans of incorporating multi-thread support to the PHP
> programming language? I haven't been able to find any initiative of this
> kind, and I was just wondering if anyone is even planning to do it. In a
> project I'm currently involved in the need for multiple threads is really
> critical, and the absence of such a feature unfortunately renders PHP
> useless. Otherwise it could be just a perfect choice.
PHP has threading support in the way of forking, The normal *nix way of threading.
This library is called Process Control functions (http://nl2.php.net/en/ref.pcntl.php).
But this only works in the CGI (console) version of PHP.
> Is it even possible to create multiple threads in the current PHP version?
> Any estimations of the amount of work required? I have no experience on
> Windows, so someone should anyway convert pthreads to their Windows
> correspondents.
This kind of threading (forking) only works in *nix enviroments. As far as i know PHP doesn't
support Windows threading.
Very cool stuff for daemons :-) Also the *nix signals (sighup, sigint, etc) are supported.
Have fun!
Dave Mertens