APR::OS - Perl API for Platform-specific APR API |
APR::OS - Perl API for Platform-specific APR API
use APR::OS ();
# get thread id my $tid_obj = APR::OS::thread_current(); my $tid = $$tid_obj;
APR::OS
provides the Perl interface to platform-specific APR API.
You should be extremely careful when relying on any of the API provided by this module, since they are no portable. So if you use those you application will be non-portable as well.
APR::OS
provides the following methods:
thread_current
Get the thread ID
$tid_obj = APR::OS::thread_current();
$tid_obj
( APR::OS::Thread
object )$$tid_obj
.
That value is a thread ID under threaded MPMs, otherwise 0.
Example:
use Apache::MPM (); use APR::OS (); if (Apache::MPM->is_threaded) { my $tid_obj = APR::OS::thread_current(); print "TID: $$tid_obj"; } else { print "PID: $$"; }
mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0.
The mod_perl development team and numerous contributors.
APR::OS - Perl API for Platform-specific APR API |