Re: threads, XSUB allocated memory, destructors, destruction




"Tassilo v. Parseval"
..
..
> Cloning happens with every variable showing up in a threaded program
> (unless it's shared).
>

Or unless CLONE_SKIP() returns 1.
I haven't explained my confusion very well. Setting CLONE_SKIP fixes the
problem by preventing the cloning. But looks to me that the cloning is not
the real problem - it's the DESTROY() that gets called that does the
damage - which makes CLONE_SKIP a workaround, rather than a fix (... I know
.... it's a moot distinction). Perhaps the correct way to fix the problem is
to do something appropriate within the 'CLONE' subroutine - though I don't
know what that "something appropriate" actually is. The perlmod docs seems
to be saying that is the purpose of the CLONE subroutine:

"In "CLONE" you can do whatever you need to do, like for example handle the
cloning of non-Perl data, if necessary."

Looking at it another way:
If it's ok that unblessed objects be cloned, then it ought to be ok that
blessed objects also be cloned.

Is it possible to prevent cloning of unblessed objects ? Does CLONE_SKIP
work in a script that doesn't declare a package name ? (ie does it work in
package main ? How would one verify ?)

Cheers,
Rob


.



Relevant Pages

  • Re: Cloning ethics in science fiction - help?
    ... the quote about cloning being the sin of vanity if I can find it back ... CLONE page of ULTIMATE SCIENCE FICTION WEB GUIDE ...
    (rec.arts.sf.composition)
  • Re: best cloning method?
    ... a dozen other cloning utilities, ... partition is being cloned), and the new partition will be as ... starting up the clone OS for the first time. ... Any 2 year old could do better than that pathetic effort, child. ...
    (comp.sys.ibm.pc.hardware.storage)
  • Re: Hard drive
    ... >> You mentioned that your system doesn't know your clone drive exists so it ... >>> When the cloning is finished I remove it.I install and remove after I ... >>> If I screw up one partition I just have to open TrueImage and restore ...
    (microsoft.public.windowsxp.newusers)