Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51039 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95943 invoked from network); 16 Dec 2010 10:01:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Dec 2010 10:01:10 -0000 X-Host-Fingerprint: 95.31.13.88 xdmitri2.static.corbina.ru Received: from [95.31.13.88] ([95.31.13.88:21259] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 23/61-19877-463E90D4 for ; Thu, 16 Dec 2010 05:01:09 -0500 Message-ID: <23.61.19877.463E90D4@pb1.pair.com> To: internals@lists.php.net References: <1292411981.2128.2.camel@guybrush> <91.E1.59023.9ADC90D4@pb1.pair.com> <2BF813E9-0314-4627-A278-601E357A8B01@macvicar.net> Date: Thu, 16 Dec 2010 12:29:56 +0300 Lines: 33 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 X-Posted-By: 95.31.13.88 Subject: Re: [PHP-DEV] Re: PHP Performance in Apache: Multi-Process vs Multi-Threaded From: dmda@yandex.ru ("jvlad") > "Scott MacVicar" wrote in message: > > > > > > Do you think any locking function is implemented in openssl php > > extension? > > > In PHP a SSL_CTX is per thread and is not shared across other threads so > it isn't an issue. We don't need to implement any openssl locking > functions. It does not matter whether you think the locking functions are needed or not. It's matter what openssl developers think and what assumptions they did when developed the library. As I see they expressed it pretty clear - some globals are implicitly shared among threads and this alone may cause crashes if locks are not used. Do you have any _strong_ reason to believe they are wrong? They didn't say that it's SSL_CTX is the global struct that will be implicitly shared. Even if you're correct and SSL_CTX is "the global", why would they need 32 locks synchronizing access to it? > An example of non-thread safe is gettext it relies on the locale which is > per process and not per-thread. > PHP itself at the core is thread safe. As Johannes said most common > modules are too. Not only yet. Do you remember dl() ? It's still here and being enabled may cause races. Do you think chdir won't cause races? -j