Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65410 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 344 invoked from network); 29 Jan 2013 15:32:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jan 2013 15:32:58 -0000 Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 213.123.20.132 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 213.123.20.132 c2bthomr14.btconnect.com Received: from [213.123.20.132] ([213.123.20.132:48820] helo=mail.btconnect.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D5/33-10721-8ABE7015 for ; Tue, 29 Jan 2013 10:32:57 -0500 Received: from host81-138-11-136.in-addr.btopenworld.com (EHLO _10.0.0.5_) ([81.138.11.136]) by c2bthomr14.btconnect.com with ESMTP id KOS33959; Tue, 29 Jan 2013 15:32:53 +0000 (GMT) Message-ID: <5107EBA4.2010109@lsces.co.uk> Date: Tue, 29 Jan 2013 15:32:52 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0 SeaMonkey/2.15 MIME-Version: 1.0 To: PHP internals References: <5107C093.1040808@lsces.co.uk> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Mirapoint-IP-Reputation: reputation=Fair-1, source=Queried, refid=tid=0001.0A0B0302.5107EBA5.0001, actions=tag X-Junkmail-Premium-Raw: score=7/50, refid=2.7.2:2013.1.29.150316:17:7.944, ip=81.138.11.136, rules=__MOZILLA_MSGID, __HAS_MSGID, __SANE_MSGID, __HAS_FROM, __USER_AGENT, __MOZILLA_USER_AGENT, __MIME_VERSION, __TO_MALFORMED_2, __BOUNCE_CHALLENGE_SUBJ, __BOUNCE_NDR_SUBJ_EXEMPT, __CT, __CT_TEXT_PLAIN, __CTE, URI_ENDS_IN_PHP, __ANY_URI, __CP_URI_IN_BODY, BODY_ENDS_IN_URL, BODY_SIZE_1700_1799, BODYTEXTP_SIZE_3000_LESS, __MIME_TEXT_ONLY, RDNS_GENERIC_POOLED, HTML_00_01, HTML_00_10, BODY_SIZE_5000_LESS, RDNS_SUSP_GENERIC, RDNS_SUSP, BODY_SIZE_2000_LESS, BODY_SIZE_7000_LESS X-Junkmail-Status: score=10/50, host=c2bthomr14.btconnect.com X-Junkmail-Signature-Raw: score=unknown, refid=str=0001.0A0B020C.5107EBA5.005E:SCFSTAT14830815,ss=1,re=-4.000,fgs=0, ip=0.0.0.0, so=2011-07-25 19:15:43, dmn=2011-05-27 18:58:46, mode=multiengine X-Junkmail-IWF: false Subject: Re: [PHP-DEV] Thread Safe ... From: lester@lsces.co.uk (Lester Caine) Ferenc Kovacs wrote: > On Tue, Jan 29, 2013 at 1:29 PM, Lester Caine wrote: > >> Can someone please fill in a little information here. When we start >> looking at multiple threads doing for example database lookups in parallel >> with the main page generation. Does that involve 'thread safe' or is it >> done in a different way? Scheduling a data lookup on one thread while >> building the page the information is to be displayed on seems like a case >> for threading in the web server? >> >> > we don't have threads in userspace in php, sou you can't do concurrent > execution of any function, but there are a couple of extensions providing > some way for concurrent/async execution. > for the scenario what you described one can use multiple db connections and > async queries > http://www.php.net/manual/en/mysqli.poll.php#refsect1-mysqli.poll-examplesfor > mysql > or just a single connection and doing some other work (like rendering the > layout) while waiting for the results. > if you are interested in a generic solution for concurrent execution you > could look into http://php.net/manual/en/book.pthreads.php Thanks ... That confirms what I thought. In order to add concurrent operations which to my mind are of more use than 'accessors' we do need ZTS mode enabled. This is I think a perfectly valid reason for wanting to maintain ZTS in the future? -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk