On Thu, 7 Aug 2008 14:04:24 -0500 "David Nicol" <[EMAIL PROTECTED]> wrote: 

DN> On Thu, Aug 7, 2008 at 11:01 AM, Ted Zlatanov <[EMAIL PROTECTED]> wrote:
>> I plan to add the interpreter (Perl context, actually) address when I
>> get a chance, Ben Morrow was kind enough to point out what I was
>> missing.  Then it will be more correct than the current version.  Does
>> anyone know if the context address is unique in mod_perl and with
>> threads?  If not, what can I do?

DN> it seems like if it isn't, extending the instance key using the pid
DN> and tid would be best made the application developers problem.

DN> Suggesting an approach in the Devel::Callsite documentation by
DN> providing example code that produces an instance key that will be
DN> valid in forking and threading environments, would make more sense IMO
DN> than spoiling Devel::Callsite's focus.

You're probably right.  I was thinking as a user of the module (with
Every.pm), thanks for pointing this out.

>From thrtut, it seems that threads->self()->tid() will return the thread
ID, and of course $$ is the PID.  Is there a one-liner that will DTRT
whether threads are loaded or not?  I couldn't find one, so the usage
example may have to be a little more complex.

Ted

Reply via email to