mod_perl logo perl icon
previous page: APR::IpSubnet - Perl API for accessing APRs ip_subnet structurespage up: mod_perl 2.0 APInext page: APR::PerlIO -- Perl IO layer for APR

APR::OS - Perl API for Platform-specific APR API






Writing Apache Modules with Perl and C

Writing Apache Modules with Perl and C

By Lincoln Stein, Doug MacEachern
Embedding Perl in HTML with Mason

Embedding Perl in HTML with Mason

By Dave Rolsky, Ken Williams
mod_perl2 User's Guide

mod_perl2 User's Guide

By Stas Bekman, Jim Brandt
Practical mod_perl

Practical mod_perl

By Stas Bekman, Eric Cholet
The mod_perl Developer's Cookbook

The mod_perl Developer's Cookbook

By Geoffrey Young, Paul Lindner, Randy Kobes
mod_perl Pocket Reference

mod_perl Pocket Reference

By Andrew Ford


Table of Contents

Synopsis

  use APR::OS ();
  
  # get current thread id
  my $tid = APR::OS::current_thread_id();


TOP

Description

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.



TOP

API

APR::OS provides the following methods:



TOP

current_thread_id

Get the current thread ID

  $tid = APR::OS::current_thread_id();

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: $$";
    }


TOP

See Also

mod_perl 2.0 documentation.



TOP

Copyright

mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0.



TOP

Authors

The mod_perl development team and numerous contributors.






TOP
previous page: APR::IpSubnet - Perl API for accessing APRs ip_subnet structurespage up: mod_perl 2.0 APInext page: APR::PerlIO -- Perl IO layer for APR