APR::OS (3)
Leading comments
Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) Standard preamble: ========================================================================
NAME
APR::OS - Perl API for Platform-specific APR APISynopsis
use APR::OS (); # get current thread id my $tid = APR::OS::current_thread_id();
Description
"APR::OS" provides the Perl interface to platform-specificAPR 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.
API
"APR::OS" provides the following methods:current_thread_id
Get the current threadID
$tid = APR::OS::current_thread_id();
- ret: $tid ( integer )
-
under threaded MPMs returns the current thread ID,otherwise 0.
- since: 2.0.00
Example:
use Apache2::MPM (); use APR::OS (); if (Apache2::MPM->is_threaded) { my $tid_obj = APR::OS::current_thread_id(); print "TID: $tid"; } else { print "PID: $$"; }