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
33 META: Autogenerated - needs to be reviewed/completed
34
35 Destroy the mutex and free the memory associated with the lock.
36
37 $mutex->DESTROY();
38
39 obj: $mutex ( "APR::ThreadMutex object" )
40 the mutex to destroy.
41
42 ret: no return value
43 since: subject to change
44
45 "lock"
46
47 META: Autogenerated - needs to be reviewed/completed
48
49 Acquire the lock for the given mutex. If the mutex is already locked,
50 the current thread will be put to sleep until the lock becomes avail‐
51 able.
52
53 $ret = $mutex->lock();
54
55 obj: $mutex ( "APR::ThreadMutex object" )
56 the mutex on which to acquire the lock.
57
58 ret: $ret ( integer )
59 since: subject to change
60
61 "new"
62
63 Create a new mutex
64
65 my $mutex = APR::ThreadMutex->new($p);
66
67 obj: "APR::ThreadMutex" ( class name )
68 arg1: $p ( "APR::Pool object" )
69 ret: $mutex ( "APR::ThreadMutex object" )
70 since: subject to change
71
72 "pool_get"
73
74 META: Autogenerated - needs to be reviewed/completed
75
76 META: should probably be renamed to pool(), like all other pool acces‐
77 sors
78
79 Get the pool used by this thread_mutex.
80
81 $ret = $obj->pool_get();
82
83 obj: $obj ( "APR::ThreadMutex object" )
84 ret: $ret ( "APR::Pool object" )
85 apr_pool_t the pool
86
87 since: subject to change
88
89 "trylock"
90
91 META: Autogenerated - needs to be reviewed/completed
92
93 Attempt to acquire the lock for the given mutex. If the mutex has
94 already been acquired, the call returns immediately with APR_EBUSY.
95 Note: it is important that the APR_STATUS_IS_EBUSY(s) macro be used to
96 determine if the return value was APR_EBUSY, for portability reasons.
97
98 $ret = $mutex->trylock();
99
100 obj: $mutex ( "APR::ThreadMutex object" )
101 the mutex on which to attempt the lock acquiring.
102
103 ret: $ret (integer)
104 since: subject to change
105
106 "unlock"
107
108 META: Autogenerated - needs to be reviewed/completed
109
110 Release the lock for the given mutex.
111
112 $ret = $mutex->unlock();
113
114 obj: $mutex ( "APR::ThreadMutex object" )
115 the mutex from which to release the lock.
116
117 ret: $ret ( integer )
118 since: subject to change
119
121 mod_perl 2.0 documentation.
122
124 mod_perl 2.0 and its core modules are copyrighted under The Apache
125 Software License, Version 2.0.
126
128 The mod_perl development team and numerous contributors.
129
130
131
132perl v5.8.8 2006-11-19 docs::api::APR::ThreadMutex(3)