Electronics & Programming


Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » PHP
  • » [PHP-DEV] Re: ts_free_thread() frees only temporary in multiple parallel threads [RSS Feed]

#1 Dec. 13, 2010 18:39:27

Benjamin F.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] Re: ts_free_thread() frees only temporary in multiple parallel threads

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.


> 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...

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


  • Root
  • » PHP
  • » [PHP-DEV] Re: ts_free_thread() frees only temporary in multiple parallel threads [RSS Feed]

Board footer

Moderator control

Enjoy the 27th of May

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support