> It should be a runtime or compiletime flag in each extension, not a
> seperate text file that someone needs to read.

In a truely perfect world we would have that compile time flag in the
extension definition structure, and then could do a extension specific
lock (mutex) before calling functions in extensions that are not
thread safe. Doing so would allow php with ZTS to call the dirtiest
non-thread safe library without fear. Some might say that doing such a
coarse grained lock would trash performance, but at least then you
would be less likely to run into concurrency issues. As I mentioned, I
would try to use an extension specific mutex instead of a single
global mutex as it would (hopefully) reduce stalls if more than one
unsafe extension was in use.

But that would be a lot more work and would require a non-trivial
effort from the guys that know the core followed by a change to all of
the extensions. And I know that I am not ready to try a change like
that in the core :-)

dave


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

Reply via email to