At 03:02 PM 9/7/00 +0100, Nick Ing-Simmons wrote:
>Alan Burlison <[EMAIL PROTECTED]> writes:
> >Jarkko Hietaniemi wrote:
> >
> >> Multithreaded programming is hard and for a given program the only
> >> person truly knowing how to keep the data consistent and threads not
> >> strangling each other is the programmer.  Perl shouldn't try to be too
> >> helpful and get in the way.  Just give user the bare minimum, the
> >> basic synchronization primitives, and plenty of advice.
> >
> >Amen.  I've been watching the various thread discussions with increasing
> >despair.
>
>I am glad it isn't just me !

Nope, it's not just you. It all looks eerily familiar, quite like when Alan 
was taking the ClueStick to my head back a few years when threads hit 
5.005... :)

The only safe thing I can think of to do is have the vtable functions for 
shared variables to lock on entry and unlock on exit (internal locks, mind) 
their data structures. This'll make things safe and should be 
deadlock-proof for standard code, since only one internal lock will ever be 
held at once.

Of course, this idea gets shot to heck as soon as someone installs a vtable 
function written in perl, but I suppose we'll just have to warn folks of 
the dangers and let them dive in where they like...

                                        Dan

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

Reply via email to