Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51022 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59547 invoked from network); 13 Dec 2010 18:38:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Dec 2010 18:38:38 -0000 Authentication-Results: pb1.pair.com smtp.mail=buzle@gmx.de; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=buzle@gmx.de; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 213.165.64.23 as permitted sender) X-PHP-List-Original-Sender: buzle@gmx.de X-Host-Fingerprint: 213.165.64.23 mailout-de.gmx.net Linux 2.6 Received: from [213.165.64.23] ([213.165.64.23:37170] helo=mail.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 06/00-59102-D28660D4 for ; Mon, 13 Dec 2010 13:38:38 -0500 Received: (qmail invoked by alias); 13 Dec 2010 18:31:54 -0000 Received: from p5DD2840F.dip0.t-ipconnect.de (EHLO [192.168.178.24]) [93.210.132.15] by mail.gmx.net (mp021) with SMTP; 13 Dec 2010 19:31:54 +0100 X-Authenticated: #11405454 X-Provags-ID: V01U2FsdGVkX18VoYpBwcoV6ZEq8GEqSmtaA9DPJQ9795+QNjzjPq 6uBBL5qKa+rk+x Message-ID: <4D066691.20606@gmx.de> Date: Mon, 13 Dec 2010 19:31:45 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Bas van Beek , internals@lists.php.net References: <4D04EE88.9050104@gmail.com> <884B1771-1A50-40A0-8BC4-9B37A3691203@tobin.nl> In-Reply-To: <884B1771-1A50-40A0-8BC4-9B37A3691203@tobin.nl> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Subject: Re: [PHP-DEV] Re: ts_free_thread() frees only temporary in multiple parallel threads From: buzle@gmx.de (Benjamin Franke) I referred to the following version of php_embed2: http double dot slash slash svn.tobin.nl/public/php/embed2/trunk/ This seems to be an official php release especially for multi-threaded usage but it is not included in official sources. I just compiled it with my sources and followed the example usage as written in the examples included within this package. Greetz > Hi Gary, > > Which php_embed2 module are you referring to? > > I've made one quite some time ago but never got time to clean it up or even post it to the official source tree as none of the established PHP devs saw any importance in having a thread safe embedded module. So I gave up my efforts and will pick it up shortly for internal usage (as I'm in need of one again). > > kind regards, > > Bas van Beek > > > Op 12 dec 2010, om 16:47 heeft Gary Zipfel het volgende geschreven: > >> (Referring to my posts: #50838 and #50916) >> >> Well although I got the feeling no one cares, I finally found a solution >> to my problem!!! >> >> Combining my patch (from post #50916) with the php_embed2 module makes >> everything working great in multi-threaded usage. The normal php_embed >> module does not seem to be designed for that. >> >> So my final conclusion for the multi-threaded SAPI is the following: >> - my patch is needed (to avoid false resource allocation) >> - php_embed2 module is needed (instead of php_embed) >> - TSRMLS_FETCH() needs to be called at the start of every request >> - ts_free_thread() should be called at the end of every request >> >> But I still would like to get any comment about my patch... >>