> How would you make sure the reference counts are correct without
> locking?
>
Yes, a lock is required per variable, but these locks can be stored
in a separate hash, keyed by variable address and magic can be used
to lock a variable before accessing.
It should be possible for multiple interp
Thanks for the response.
> >Instead, is it not possible to just increment the reference count
> >of every variable by overloading its clone method. The destructor
> >can then reduce the reference count. I don't know
> >enough about cloning to figure out if this will work yet. Perhaps
> >the is
I read through most of the archive but I am still unable to figure out
why implementing shared variables requires all this complexity. Let
me start with a description of my understanding of threads:
. All shared variables need to be accessible from the interpreters
corresponding to the threads
I am using perl threads for developing a simulator and ran into the
memory leak. I've gone 90% of the way with Perl, so, given the time
I've invested, I'd like to see it through. I would like to contribute
to fixing the problem. Does anybody have a good estimate of the
complexity of the proble