At 11:30 PM 5/3/2001 +0100, Nicholas Clark wrote:
>On Thu, May 03, 2001 at 06:17:42PM -0400, Dan Sugalski wrote:
> > At 11:10 PM 5/3/2001 +0100, Nicholas Clark wrote:
>
> > >as well as licences, can we add CPAN sections for threadsafeness and
> > >unicodesafeness, so module authors can declare if they know they have 
> coded
> > >to cope with them. [I can see a lot of "unknown"s turning up]
> >
> > That would be a sensible thing, I think. (Though I don't know I'd trust
> > anything but a "No", given a lot of the "threadsafe" code I've seen...)
>
>Well, I was going to mark all of my PerlIO stuff as "No, it's not threadsafe"
>until proven otherwise. And I'm not competent in threads, so I'm not going
>to be the one declaring them safe.

It's not that tough, though it gets tougher the more complex the code is 
that you're welding thread-safety into. Dunno that I'd worry that much for 
perl 5.x, though. (If you want, declare a global mutex and just coordinate 
all the perlio stuff on it. Things single-thread, but it beats data corruption)

>But I'd agree with you that many things might be marked safe in error.

And most of the errors I was thinking of are conceptual ones, too. (It's 
amazing what folks consider appropriate in a threaded environment. Great 
gobs of stuff go bang really quickly when run in an SMP environment...)

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to