Ferenc Kovacs wrote:
On Tue, Jan 29, 2013 at 1:29 PM, Lester Caine <les...@lsces.co.uk> 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

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to