Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35722 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4576 invoked by uid 1010); 22 Feb 2008 08:54:36 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 4561 invoked from network); 22 Feb 2008 08:54:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Feb 2008 08:54:36 -0000 Authentication-Results: pb1.pair.com header.from=tstarling@wikimedia.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=tstarling@wikimedia.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain wikimedia.org from 66.111.4.27 cause and error) X-PHP-List-Original-Sender: tstarling@wikimedia.org X-Host-Fingerprint: 66.111.4.27 out3.smtp.messagingengine.com Received: from [66.111.4.27] ([66.111.4.27:47600] helo=out3.smtp.messagingengine.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 83/C2-64513-BCD8EB74 for ; Fri, 22 Feb 2008 03:54:36 -0500 Received: from compute2.internal (compute2.internal [10.202.2.42]) by out1.messagingengine.com (Postfix) with ESMTP id 69BB994FB2 for ; Fri, 22 Feb 2008 03:54:33 -0500 (EST) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute2.internal (MEProxy); Fri, 22 Feb 2008 03:54:33 -0500 X-Sasl-enc: zLPGnr90C/XPRexFn3xMnMTdOlh2oOMDrZBRvTcC6r8U 1203670472 Received: from [192.168.0.2] (CPE-121-209-187-75.nsw.bigpond.net.au [121.209.187.75]) by mail.messagingengine.com (Postfix) with ESMTPSA id 6E01824DA4 for ; Fri, 22 Feb 2008 03:54:32 -0500 (EST) Message-ID: <47BE8DC9.8070802@wikimedia.org> Date: Fri, 22 Feb 2008 19:54:33 +1100 User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: internals Mailing List References: <47BD0267.3050809@wikimedia.org> <47BDB629.6050600@zend.com> In-Reply-To: <47BDB629.6050600@zend.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Multi-threading From: tstarling@wikimedia.org (Tim Starling) Stanislav Malyshev wrote: > Hi! > >> Just an uninformed thought: maybe the existing TSRM framework could >> be leveraged to provide some simple multithreading support to the user. > > TSRM is meant to support "share nothing" in threaded environment. > Multi-threading should support sharing data (including locking & > synchronization) which is quite different business. > > It may be easier to do pseudo-multithreading a-la Python, where > there's only one thread running at each moment of time, but they can > switch when other threads are waiting for something like I/O or some > event. That would require some work for defining engine state and > enabling switching, but it's easier than full multithreading support. > Unfortunately, as for now nobody showed real interest in doing that. I'm saying that you could make multiple "share nothing" instances available to the user, for a programming model intermediate between multiprocessing and traditional threading. Python-style multithreading wouldn't be useful for the applications I have in mind. -- Tim Starling