> Am Mittwoch, 21. August 2002 22:09 schrieb Shane Caraveo:
>> Rasmus Lerdorf wrote:
>> > production quality. The best we can do is pick a small set
>> > of extensions and a small set of platforms and say that with
>> > the limited set of extensions, against a specific set of
>> > versions of addon libraries on a specific version of that
>> > OS, yes, it should be production quality - maybe.
>
> I believe the designers of the Roxen web server were in a similar
> situation as Roxen is threaded, too. They worked around this
> problem with wrapper functions that kept a per-library lock for
> each library that was not tested as threadsafe.
>
> They gradually improved the granularity of their locks, and
> isolated threadsafe functions, improving performance.
>

This is certainly an option, however, improving granularity does have some
problems, mainly that you can't always know, for example, with PostgreSQL
you'd have to analyze the SQL query to get true mutex granularity.  Also,
running a query, and halting all thread accesses per SQL query can make an
application go sloooooooooooooooooooooow, especially when its only one or
two (SQL) functions that actually require the mutex.

Yes, it is better than segfaulting :)

> How are the perl people handling this issue? I believe they are
> using the same libs as we do.
>

I'm not sure, I think they are either:

1) Mutexing the entire library
2) Not worrying about it, because Perl is threadsafe, it really depends on
the modules that you fetch from CPAN.

-Sterling



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

Reply via email to