Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35682 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78992 invoked by uid 1010); 21 Feb 2008 11:34:02 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 78977 invoked from network); 21 Feb 2008 11:34:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Feb 2008 11:34:02 -0000 X-Host-Fingerprint: 82.41.135.70 82-41-135-70.cable.ubr02.glen.blueyonder.co.uk Received: from [82.41.135.70] ([82.41.135.70:14708] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7A/50-10952-9A16DB74 for ; Thu, 21 Feb 2008 06:34:01 -0500 Message-ID: <7A.50.10952.9A16DB74@pb1.pair.com> To: internals@lists.php.net Date: Thu, 21 Feb 2008 11:33:10 +0000 Reply-To: nrixham@gmail.com User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 82.41.135.70 Subject: Re: [PHP-DEV] Multi-threading From: nrixham@gmail.com (Nathan Rixham) David Coallier wrote: > On Wed, Feb 20, 2008 at 10:36 PM, Felipe Ribeiro 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