Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:390 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63814 invoked from network); 27 Mar 2003 18:15:34 -0000 Received: from unknown (HELO gateway.zk3.dec.com) (206.152.163.42) by pb1.pair.com with SMTP; 27 Mar 2003 18:15:34 -0000 Received: by gateway.zk3.dec.com; (5.65v4.0/1.3/10May95) id AA20975; Thu, 27 Mar 2003 13:15:34 -0500 Received: from little1 by lead.zk3.dec.com (8.12.1/1.1.20.3/27Apr99-0346PM) id h2RIFWVL219144; Thu, 27 Mar 2003 13:15:32 -0500 (EST) Message-ID: <012c01c2f48c$d3a1f2c0$e3008d10@little1> To: Cc: "Shane Caraveo" References: <010f01c2f480$44f76390$e3008d10@little1> <3E8338F2.1030400@caraveo.com> Date: Thu, 27 Mar 2003 13:15:19 -0500 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-Msmail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-Mimeole: Produced By Microsoft MimeOLE V6.00.2800.1106 Subject: Re: [PHP-DEV] Reentrancy and extensions From: ddhill@php.net ("David Hill \(php.net\)") > It should be a runtime or compiletime flag in each extension, not a > seperate text file that someone needs to read. In a truely perfect world we would have that compile time flag in the extension definition structure, and then could do a extension specific lock (mutex) before calling functions in extensions that are not thread safe. Doing so would allow php with ZTS to call the dirtiest non-thread safe library without fear. Some might say that doing such a coarse grained lock would trash performance, but at least then you would be less likely to run into concurrency issues. As I mentioned, I would try to use an extension specific mutex instead of a single global mutex as it would (hopefully) reduce stalls if more than one unsafe extension was in use. But that would be a lot more work and would require a non-trivial effort from the guys that know the core followed by a change to all of the extensions. And I know that I am not ready to try a change like that in the core :-) dave