1docs::api::APR::OS(3) User Contributed Perl Documentationdocs::api::APR::OS(3)
2
3
4

NAME

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

Synopsis

9         use APR::OS ();
10
11         # get current thread id
12         my $tid = APR::OS::current_thread_id();
13

Description

15       "APR::OS" provides the Perl interface to platform-specific APR API.
16
17       You should be extremely careful when relying on any of the API provided
18       by this module, since they are no portable. So if you use those you
19       application will be non-portable as well.
20

API

22       "APR::OS" provides the following methods:
23
24       "current_thread_id"
25
26       Get the current thread ID
27
28         $tid = APR::OS::current_thread_id();
29
30       ret: $tid ( integer )
31           under threaded MPMs returns the current thread ID, otherwise 0.
32
33       since: 2.0.00
34
35       Example:
36
37           use Apache2::MPM ();
38           use APR::OS ();
39           if (Apache2::MPM->is_threaded) {
40               my $tid_obj = APR::OS::current_thread_id();
41               print "TID: $tid";
42           }
43           else {
44               print "PID: $$";
45           }
46

See Also

48       mod_perl 2.0 documentation.
49
51       mod_perl 2.0 and its core modules are copyrighted under The Apache
52       Software License, Version 2.0.
53

Authors

55       The mod_perl development team and numerous contributors.
56
57
58
59perl v5.8.8                       2006-11-19             docs::api::APR::OS(3)
Impressum