Re: Request for Threads or SRM
| From: | Rasmus Lerdorf | Date: | Thu, 24 Nov 2005 20:03:10 +0000 |
| Subject: | Re: Request for Threads or SRM | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-20315@lists.php.net to get a copy of this message | ||
Leonardo Pedretti wrote:
On Thursday 24 November 2005 15:39, Rasmus Lerdorf wrote:I agree that for an event-driven standalone GTK app it would make sense. It starts to make less sense in a web application where a thread is really a request. There are times when you want some asynchronous things like being able to query 100 remote urls at the same time, or you might want an asynchronous DNS lookup, but in most of these cases threads aren't actually the best way to do that. If a patch comes along that implements it in a sane manner without complicating everything we will look at it of course. But among the current core developers I don't think any of us need this so my guess is that it would take an outside effort. -RasmusD. Dante Lorenso wrote:And threads? well I must say that with php-gtk for gui client apps and php in general with all the objects engine as it is now, threads would turn it into a really powerful development framework for everything. Is there any research in the topic, or is it just sleeping waiting for the right moment to be?All, I have been trying to use PHP 5.0.5 for all my programming tasks including replacing many stand-alone Java servers. I've been successful to a degree, but I'm seriously missing Java Threads. I've written some code which uses SHM, Sockets, IPC, and PCNTL, but it's not as clean and robust as it should be. Since the jury is still deliberating over PHP6 and what it will offer, I'd like to put in my request to have a native PHP Thread object. If Threads are too much to tackle, it would be nice to have something like SRM (Script Running Machine) which could be used for CLI environment stand-alone servers.That's way outside the scope of what we have planned for PHP 6 and I can pretty much guarantee it won't happen. The SRM-like thing doesn't need to be part of PHP though. Anybody can build such a beast. -Rasmus