01-05-04 12.16, skrev Alan Burlison p� [EMAIL PROTECTED] f�ljande:

> Dan Sugalski wrote:
> 
>> Serializing calls into a non-thread-safe library will often be enough. Not
>> always, mind, but quite often.
> 
> Only if the library has no stored state.
> 
> Alan Burlison
> 

But that is pretty easy to fix by using thread local storage (like perl does
for the current perl-interpreter).

It shouldn't me too much of work to make a library thread-safe, it is much
harder to make it utilize the fact that there are threads.

Maybe it would be possible to add a option to XS to automaticly add code to
mutex protect an entire library. (This won't solve the problem with stored
state, but my belief is it would help in most cases).

Artur

Reply via email to