Philippe M. Chiasson wrote:
It should be useful when ithreads perl and interpreter pool is used. (e.g. the same_interp A-T invents an ID, but here we could pass a real memory address, if we knew that the running mp2 version supports ithreads.Stas Bekman wrote:
While debugging the current post_config problem I wanted to know which perl interpreter is currently running, so I've added the following wrapper, that under ithreads perl returns the address of my_perl (aTHX) (.e.g 0x92ac760) and 0 under non-threaded perl (0x0). I tend to want to add it to our API (we already have the function that returns the thread id: APR::OS::current_thread_id();).
1) do we want it?
If it's a potentially usefull piece of debugging information, I think I'd want it too.
That would certainly make some strange bugs easier to track down if the 2 ids were in sync.
2) is it a good name? I typed ppid quite a few times instead of piid while writing this patch :( ppid stands for Perl Interpreter ID'. So if you think it should have a different please have a say. e.g. current_perl_id() or current_perl_interpreter_id (but it's not really an id, but just an address)
ModPerl::Util::this_perl_id() ? ModPerl::Util::this_perl() ?
but that's very inconsistent with other similar functions, like APR::OS::current_thread_id();
Then I'd go:
ModPerl::Util::current_perl_id();
--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5 http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5
begin:vcard fn:Philippe M. Chiasson n:Chiasson;Philippe M. email;internet:[EMAIL PROTECTED] x-mozilla-html:FALSE version:2.1 end:vcard
signature.asc
Description: OpenPGP digital signature
