Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65412 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3658 invoked from network); 29 Jan 2013 15:48:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jan 2013 15:48:33 -0000 Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.170 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.223.170 mail-ie0-f170.google.com Received: from [209.85.223.170] ([209.85.223.170:62767] helo=mail-ie0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DF/D3-10721-05FE7015 for ; Tue, 29 Jan 2013 10:48:32 -0500 Received: by mail-ie0-f170.google.com with SMTP id c11so451610ieb.29 for ; Tue, 29 Jan 2013 07:48:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=OaCrD05LHNXonaQl7V+V9FdfRHOVIdXqf5fNnm/HaX8=; b=AKKOsGoHQP1gyLjurX60qI4uru1Pxj5otT1Ukd5GrhjgcQz1IeJjIVNKs3ILp7mYkM bLygW2/QVrjD8vSNZf+ySsa/DiktrrIipAy9Fx3SgjE8RNq15PxM/WVR9G0rzUUgJdXy RhOKwhf6gz/x2ZlEZVx+cqOsCi+ffd2h9pxRH23yng9iBIe8UKIXOGpTXPMK86zvG6RY LDe4uHAykmNdEsjafjpAxrGcm6po7EceGrUqID3Pw2PFWUWeigONvDsSErV98GcmLbb7 JCDMfH7pSVPNE3ZHHpZSZ4CJhbHUEAB7XYqM5kQFTzCsien8VtsZ8LxZx24tCwQ43wfQ MuoA== MIME-Version: 1.0 X-Received: by 10.50.196.130 with SMTP id im2mr1270564igc.17.1359474509035; Tue, 29 Jan 2013 07:48:29 -0800 (PST) Received: by 10.50.106.138 with HTTP; Tue, 29 Jan 2013 07:48:28 -0800 (PST) In-Reply-To: <5107EBA4.2010109@lsces.co.uk> References: <5107C093.1040808@lsces.co.uk> <5107EBA4.2010109@lsces.co.uk> Date: Tue, 29 Jan 2013 16:48:28 +0100 Message-ID: To: Lester Caine Cc: PHP internals Content-Type: multipart/alternative; boundary=14dae9341071313a4f04d46f537e Subject: Re: [PHP-DEV] Thread Safe ... From: tyra3l@gmail.com (Ferenc Kovacs) --14dae9341071313a4f04d46f537e Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, Jan 29, 2013 at 4:32 PM, Lester Caine wrote: > 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 ca= se >>> 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 providin= g >> 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 th= e >> 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 t= he > future? > > Yeah, and this was quickly accepted/agreed by Zeev as a reasonable usecase when it was brought up in the other thread. --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --14dae9341071313a4f04d46f537e--