Artur Bergman wrote:

> The iThread module now works in creating and joining in threads, however the
> interesting issue is sharing variables between interpreters (otherwise we
> just have fork...);

I don't want to rain on your parade, but as long as perl continues to use
setjmp/longjmp or variants thereof, you are doomed to failure.  I've said
this repeatedly, and people don't seem to want to hear:

SETJMP AND LONGJMP ARE USED EXTENSIVELY IN PERL5.  SETJMP AND LONGJMP ARE
NOT MT-SAFE.  YOU ARE WASTING YOUR TIME TRYING TO PUT MULTITHREADING INTO
PERL5 AS IT STANDS.  EVEN IF IT WORKS MOST OF THE TIME ON YOUR UNIPROCESSOR
MACHINE IT WILL EXPLODE IN YOUR FACE ON A MULTIPROCESSOR MACHINE.  THREADS
IN PERL5 ARE DOOMED TO FAILURE WITHOUT SIGNIFICANT REARCHITECTING.

AND NO, PUTTING A WHACKING GREAT GLOBAL LOCK AROUND EVERYTHING DOES NOT MAKE
PERL5 MULTITHREADED.

I hope that is clear.

Alan Burlison

Reply via email to