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

See Also

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

Authors

54       The mod_perl development team and numerous contributors.
55
56
57
58perl v5.36.0                      2022-07-21             docs::api::APR::OS(3)
Impressum