Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:6124 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87781 invoked by uid 1010); 3 Dec 2003 17:15:42 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 87757 invoked from network); 3 Dec 2003 17:15:42 -0000 Received: from unknown (HELO vckyb2.nw.wakwak.com) (211.9.230.145) by pb1.pair.com with SMTP; 3 Dec 2003 17:15:42 -0000 Received: from at.wakwak.com (at.wakwak.com [211.9.230.135]) by vckyb2.nw.wakwak.com (Postfix) with ESMTP id E6FA540124; Thu, 4 Dec 2003 02:15:40 +0900 (JST) Received: from [192.168.0.130] (z84.218-225-159.ppp.wakwak.ne.jp [218.225.159.84]) by at.wakwak.com (8.12.10/8.12.10/2003-09-30) with ESMTP/inet id hB3HFeng083429; Thu, 4 Dec 2003 02:15:40 +0900 (JST) (envelope-from moriyoshi@at.wakwak.com) In-Reply-To: <6.0.1.1.0.20031203175354.039cac08@127.0.0.1> References: <6.0.1.1.0.20031203175354.039cac08@127.0.0.1> Mime-Version: 1.0 (Apple Message framework v606) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-ID: <4CA8520C-25B4-11D8-9AC4-000A95CE0C62@at.wakwak.com> Content-Transfer-Encoding: 7bit Cc: jay@php.net, internals@lists.php.net Date: Thu, 4 Dec 2003 02:15:31 +0900 To: Uwe Schindler X-Mailer: Apple Mail (2.606) Subject: Re: [PHP-DEV] browscap and nesting level too deep (bug #25916) From: moriyoshi@at.wakwak.com (Moriyoshi Koizumi) On 2003/12/04, at 2:06, Uwe Schindler wrote: > This evening I will try to put a mutex at the beginning of get_browser > to prevent more threads running at the same time there. But as I see > this, this zend_hash_apply function is used very often could there be > other effects if a global variable is a hashtable? > > Only one question: Is there a special PHP way to use mutexes? I am not > familar in Zend programming (I do only SAPI...) Did you take a look at zend_ts_hash (only in php5) and tsrm_mutex_*() ? I'm not quite sure if the facility is enough tested and really thread-safe though. Moriyoshi