Re: threads, XSUB allocated memory, destructors, destruction
- From: "Sisyphus" <sisyphus1@xxxxxxxxxxxxxxxxx>
- Date: Sat, 8 Oct 2005 08:34:55 +1000
"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
.
- Follow-Ups:
- Re: threads, XSUB allocated memory, destructors, destruction
- From: Tassilo v. Parseval
- Re: threads, XSUB allocated memory, destructors, destruction
- References:
- Re: threads, XSUB allocated memory, destructors, destruction
- From: Sisyphus
- Re: threads, XSUB allocated memory, destructors, destruction
- From: Sisyphus
- Re: threads, XSUB allocated memory, destructors, destruction
- From: xhoster
- Re: threads, XSUB allocated memory, destructors, destruction
- From: Tassilo v. Parseval
- Re: threads, XSUB allocated memory, destructors, destruction
- From: Sisyphus
- Re: threads, XSUB allocated memory, destructors, destruction
- From: Tassilo v. Parseval
- Re: threads, XSUB allocated memory, destructors, destruction
- Prev by Date: Re: SNMP.pm
- Next by Date: Re: print prints things in strange order.
- Previous by thread: Re: threads, XSUB allocated memory, destructors, destruction
- Next by thread: Re: threads, XSUB allocated memory, destructors, destruction
- Index(es):
Relevant Pages
|