Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47743 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1992 invoked from network); 2 Apr 2010 14:04:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Apr 2010 14:04:40 -0000 Authentication-Results: pb1.pair.com header.from=ericleestewart@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=ericleestewart@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.83.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: ericleestewart@gmail.com X-Host-Fingerprint: 74.125.83.42 mail-gw0-f42.google.com Received: from [74.125.83.42] ([74.125.83.42:50814] helo=mail-gw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D8/8B-44965-779F5BB4 for ; Fri, 02 Apr 2010 09:04:40 -0500 Received: by gwb1 with SMTP id 1so1422434gwb.29 for ; Fri, 02 Apr 2010 07:04:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:content-type; bh=ezxP9ih3bC1cRr6d6xovqu/wNS2joP2Scle8zpjA0cs=; b=n9fhLDCOFeY8FP5V+PxDe8pFb/a8ZmmlrlmvmhrPF4ZUnbGUV0mTRiUhXK3tWoOjWt UKhqsqcvwM5vB0/qynZBFDg7XbicpSjx6CzvgBixotM+wJ/LgrwDVTJbF6+To54n5Zjg qT/wHi3cWh+ggGZUHBMpbl+C+Pltag+mW7BT0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=pGccTlM2dnotEwr5mhbgYD9aTnYyZDdFaGMbuII0zCsQ8CS5JfmlCO3xtNS4yQ3ANh Oi0ZjIc2C4lxOJdyBN+5wqn9dPdDRYBTD2fux7H9oJ3kQxBe9udapteyQ5HA1dfHozW2 9Gav/oCEiHOfZ8KxNNauu8zNRPO7iGnSI+XVg= MIME-Version: 1.0 Received: by 10.231.17.10 with HTTP; Fri, 2 Apr 2010 07:04:33 -0700 (PDT) In-Reply-To: <698DE66518E7CA45812BD18E807866CE03FA7EFF@us-ex1.zend.net> References: <1941231697.20100401163215@gmail.com> <698DE66518E7CA45812BD18E807866CE03FA7EFF@us-ex1.zend.net> Date: Fri, 2 Apr 2010 10:04:33 -0400 Received: by 10.101.170.2 with SMTP id x2mr5944660ano.209.1270217073454; Fri, 02 Apr 2010 07:04:33 -0700 (PDT) Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary=001636c92c9a73d6e30483417529 Subject: Re: [PHP-DEV] php and multithreading (additional arguments) From: ericleestewart@gmail.com (Eric Stewart) --001636c92c9a73d6e30483417529 Content-Type: text/plain; charset=ISO-8859-1 On Fri, Apr 2, 2010 at 1:16 AM, Andi Gutmans wrote: > Hi, > > I think that if we were ever to implement threading we would be best off > to enable spawning worker threads that have their own context with no > shared data (and therefore no requirement for locking). We could then > have a message passing API between the threads. > Advantages: > - Real multi-threading. > - Simple straightforward approach which doesn't require a comp. sci. > degree to use correctly. > - Very stable implementation. > > You can tell by this that: > a) I think GIL is not the way to go. It's more complex, not truly > multi-threaded, and implementation may never be 100%. > b) True multi-threading with data sharing in my opinion is a recipe for > disaster. Not only because of the implementation complexities but I > think it makes life very hard for the developer and requires a lot of > sophistication. > > So if I'd implement something I'd definitely do true multi-threading > with message passing (we basically already have the infrastructure with > TSRM to support that). Do I think this is a high priority item? Not > really but I can understand that it could add value to some. I think for > some Web requests it could actually allow for some parallel processing > with a rendezvous which could help reduce latency (not overall server > throughput). Then again, there'd be some overhead for having a > thread-safe build so I don't see this as something that would be enabled > by the masses - at least not initially. > > Andi > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > While this direction adds some overhead, I certainly like it's advantages over the others. +1 Eric Lee Stewart --001636c92c9a73d6e30483417529--