At 04:20 PM 5/4/2001 +0200, Artur Bergman wrote:
>01-05-04 16.16, skrev Alan Burlison p� [EMAIL PROTECTED] f�ljande:
>
> > Artur Bergman wrote:
> >
> >> But that is pretty easy to fix by using thread local storage (like
> perl does
> >> for the current perl-interpreter).
> >
> > And how exactly will you do this for a third-party binary-only library?
>
>My bad, I meant for user supplied C code on CPAN.
A remarkable amount of that code wraps third-party libraries. And binary or
not, the problem persists.
It also means someone needs to go add that code into existing stable (well,
mostly stable) code.
> >> 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).
> >
> > This is distinctly non-trivial.
>
>I don't know XS well enough to say it isn't so I take your word on it.
I do, and he's right. A non-zero chunk of CPAN's XS code isn't threadsafe
itself, either. (Definitely not for fork-style threads--there is a goodly
amount of shared state lurking)
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk