Philippe M. Chiasson wrote:
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.

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.


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();

Otherwise, the patch looks good to me.

-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to