1docs::api::APR::ThreadMUusteerx(C3o)ntributed Perl Documdeonctsa:t:iaopni::APR::ThreadMutex(3)
2
3
4
6 APR::ThreadMutex - Perl API for APR thread mutexes
7
9 use APR::ThreadMutex ();
10
11 my $mutex = APR::ThreadMutex->new($r->pool);
12 $mutex->lock;
13 $mutex->unlock;
14 $mutex->trylock;
15
17 "APR::ThreadMutex" interfaces APR thread mutexes.
18
20 "APR::ThreadMutex" provides the following functions and/or methods:
21
23 "APR::ThreadMutex" also provides auto-generated Perl interface for a
24 few other methods which aren't tested at the moment and therefore their
25 API is a subject to change. These methods will be finalized later as a
26 need arises. If you want to rely on any of the following methods please
27 contact the the mod_perl development mailing list so we can help each
28 other take the steps necessary to shift the method to an officially
29 supported API.
30
31 "DESTROY"
32 META: Autogenerated - needs to be reviewed/completed
33
34 Destroy the mutex and free the memory associated with the lock.
35
36 $mutex->DESTROY();
37
38 obj: $mutex ( "APR::ThreadMutex object" )
39 the mutex to destroy.
40
41 ret: no return value
42 since: subject to change
43
44 "lock"
45 META: Autogenerated - needs to be reviewed/completed
46
47 Acquire the lock for the given mutex. If the mutex is already locked,
48 the current thread will be put to sleep until the lock becomes
49 available.
50
51 $ret = $mutex->lock();
52
53 obj: $mutex ( "APR::ThreadMutex object" )
54 the mutex on which to acquire the lock.
55
56 ret: $ret ( integer )
57 since: subject to change
58
59 "new"
60 Create a new mutex
61
62 my $mutex = APR::ThreadMutex->new($p);
63
64 obj: "APR::ThreadMutex" ( class name )
65 arg1: $p ( "APR::Pool object" )
66 ret: $mutex ( "APR::ThreadMutex object" )
67 since: subject to change
68
69 "pool_get"
70 META: Autogenerated - needs to be reviewed/completed
71
72 META: should probably be renamed to pool(), like all other pool
73 accessors
74
75 Get the pool used by this thread_mutex.
76
77 $ret = $obj->pool_get();
78
79 obj: $obj ( "APR::ThreadMutex object" )
80 ret: $ret ( "APR::Pool object" )
81 apr_pool_t the pool
82
83 since: subject to change
84
85 "trylock"
86 META: Autogenerated - needs to be reviewed/completed
87
88 Attempt to acquire the lock for the given mutex. If the mutex has
89 already been acquired, the call returns immediately with APR_EBUSY.
90 Note: it is important that the APR_STATUS_IS_EBUSY(s) macro be used to
91 determine if the return value was APR_EBUSY, for portability reasons.
92
93 $ret = $mutex->trylock();
94
95 obj: $mutex ( "APR::ThreadMutex object" )
96 the mutex on which to attempt the lock acquiring.
97
98 ret: $ret (integer)
99 since: subject to change
100
101 "unlock"
102 META: Autogenerated - needs to be reviewed/completed
103
104 Release the lock for the given mutex.
105
106 $ret = $mutex->unlock();
107
108 obj: $mutex ( "APR::ThreadMutex object" )
109 the mutex from which to release the lock.
110
111 ret: $ret ( integer )
112 since: subject to change
113
115 mod_perl 2.0 documentation.
116
118 mod_perl 2.0 and its core modules are copyrighted under The Apache
119 Software License, Version 2.0.
120
122 The mod_perl development team and numerous contributors.
123
124
125
126perl v5.30.0 2019-10-07 docs::api::APR::ThreadMutex(3)