Re: Multi-threading

From: Date: Thu, 21 Feb 2008 11:33:10 +0000
Subject: Re: Multi-threading
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-35682@lists.php.net to get a copy of this message
David Coallier wrote:
On Wed, Feb 20, 2008 at 10:36 PM, Felipe Ribeiro <felipernb@gmail.com> wrote:
Hello, I've been reading this list for a couple of months and I have a question that might have already been discussed here before and I haven't seen, so please apologize me. My question is if there's any intent to have multi-threading support to PHP in a future version, like PHP7. I know multi-threading is an enormous source of bugs, but I think it does offer a good support for large-scale apps considering the background processes and event-driven programming, and also allowing the apps to be self-content with no needs and no dependency of external daemons like cron.
I have spoken to a few people lately about this and to be honest, the opinion I get out of multi threading in php is basically "no one cares doing it, no internals need it so badly that he'll implement it, and find people to maintain it" Opening this thread is a good idea I think, after this I'll gather all ideas and comments and make a good post out of it.
So, what's the opinion of the PHP maintainers? Regards, -- Felipe Ribeiro felipernb@gmail.com http://feliperibeiro.com 83 9979-3161 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
David, hope you don't mind me asking for a bit more info, I was always under the impressions that a thread is defined as (quote wiki) "Threads are a way for a program to fork (or split) itself into two or more simultaneously (or pseudo-simultaneously) running tasks. Threads and processes differ from one operating system to another but, in general, a thread is contained inside a process and different threads of the same process share some resources while different processes do not." and php supports pcntl_fork along with signal handlers and interprocess communication via functions like or stream_socket_pair. as such if I set up a cli app with parent and child processes (?threads), then isn't this multithreading in php? I know this strictly isn't the place for such questions, but I hope you won't mind enlightening me a little on the matter. Many Regards in advance, Nathan

« previous php.internals (#35682) next »