Hi Dmitry,

On Fri, September 19, 2014 12:43, Dmitry Stogov wrote:
> I know :)
> Interned strings in PHP5 were implemented as characters allocated in one
> single buffer. Adding new strings into this buffer from different threads
> would require synchronization (locks).
>
> In PHP7 this implementation was changed. So it's probably must be
> possible to use interned strings in ZTS now. If we use separate HashTables
> for interned strings in different threads we may share some common part of
> predefined interned strings and have new interned strings in each thread
> independently. I'm not sure if it'll work well with opcache, because it
> substitutes interned strings handling mechanism to use shared memory. May
> be it'll work out of the box. BTW: I'm not interested in implementing this
> myself.
>
> Also, if we really like ZTS, may be PHP7 is the time to switch to native
> TLS and remove all these TSRMLS macros.
> Even if it won't allow to run ZTS on some platforms, it won't be the end
> of the world, because ZTS is not really widely used now. I won't be able to
> work on it actively, but I may provide some help.
>
> Thanks. Dmitry.
>
maybe it'd make sense to do it the other way round. First get rid of TSRM,
than look what is doable with interned strings? I'd be sure in the game,
if there are enough interested people to actively do that.

Regards

Anatol

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

Reply via email to