home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-perl-addon-1.4.9-installer.exe / ThreadMutex.pm < prev    next >
Encoding:
Perl POD Document  |  2004-09-23  |  4.5 KB  |  259 lines

  1. # /*
  2. #  * *********** WARNING **************
  3. #  * This file generated by ModPerl::WrapXS/0.01
  4. #  * Any changes made here will be lost
  5. #  * ***********************************
  6. #  * 01: lib/ModPerl/Code.pm:701
  7. #  * 02: O:\147xampp\sources\mod_perl-1.99_16\blib\lib/ModPerl/WrapXS.pm:584
  8. #  * 03: O:\147xampp\sources\mod_perl-1.99_16\blib\lib/ModPerl/WrapXS.pm:1100
  9. #  * 04: Makefile.PL:335
  10. #  * 05: Makefile.PL:283
  11. #  * 06: Makefile.PL:51
  12. #  */
  13.  
  14.  
  15. package APR::ThreadMutex;
  16.  
  17. use strict;
  18. use warnings FATAL => 'all';
  19.  
  20.  
  21. use APR ();
  22. use APR::XSLoader ();
  23. our $VERSION = '0.01';
  24. APR::XSLoader::load __PACKAGE__;
  25.  
  26.  
  27.  
  28. 1;
  29. __END__
  30.  
  31. =head1 NAME
  32.  
  33. APR::ThreadMutex - Perl API for APR thread mutexES
  34.  
  35.  
  36.  
  37.  
  38. =head1 Synopsis
  39.  
  40.   use APR::ThreadMutex ();
  41.  
  42.   my $mutex = APR::ThreadMutex->new($r->pool);
  43.   $mutex->lock;
  44.   $mutex->unlock;
  45.   $mutex->trylock;
  46.  
  47.  
  48. =head1 Description
  49.  
  50. C<APR::ThreadMutex> interfaces APR thread mutexes.
  51.  
  52.  
  53.  
  54.  
  55.  
  56. =head1 API
  57.  
  58. C<APR::ThreadMutex> provides the following functions and/or methods:
  59.  
  60.  
  61. =head1 Unsupported API
  62.  
  63. C<APR::ThreadMutex> also provides auto-generated Perl interface for a
  64. few other methods which aren't tested at the moment and therefore
  65. their API is a subject to change. These methods will be finalized
  66. later as a need arises. If you want to rely on any of the following
  67. methods please contact the L<the mod_perl development mailing
  68. list|maillist::dev> so we can help each other take the steps necessary
  69. to shift the method to an officially supported API.
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77. =head2 C<DESTROY>
  78.  
  79. META: Autogenerated - needs to be reviewed/completed
  80.  
  81. Destroy the mutex and free the memory associated with the lock.
  82.  
  83.   $mutex->DESTROY();
  84.  
  85. =over 4
  86.  
  87. =item obj: C<$mutex>
  88. ( C<L<APR::ThreadMutex object|docs::2.0::api::APR::ThreadMutex>> )
  89.  
  90. the mutex to destroy.
  91.  
  92. =item ret: no return value
  93.  
  94. =item since: subject to change
  95.  
  96. =back
  97.  
  98.  
  99.  
  100.  
  101.  
  102. =head2 C<lock>
  103.  
  104. META: Autogenerated - needs to be reviewed/completed
  105.  
  106. Acquire the lock for the given mutex. If the mutex is already locked,
  107. the current thread will be put to sleep until the lock becomes available.
  108.  
  109.   $ret = $mutex->lock();
  110.  
  111. =over 4
  112.  
  113. =item obj: C<$mutex>
  114. ( C<L<APR::ThreadMutex object|docs::2.0::api::APR::ThreadMutex>> )
  115.  
  116. the mutex on which to acquire the lock.
  117.  
  118. =item ret: C<$ret> ( integer )
  119.  
  120. =item since: subject to change
  121.  
  122.  
  123. =back
  124.  
  125.  
  126.  
  127. =head2 C<new>
  128.  
  129. Create a new mutex
  130.  
  131.   my $mutex = APR::ThreadMutex->new($p);
  132.  
  133. =over
  134.  
  135. =item obj: C<APR::ThreadMutex> ( class name )
  136.  
  137. =item arg1: C<$p>
  138. ( C<L<APR::Pool object|docs::2.0::api::APR::Pool>> )
  139.  
  140. =item ret: C<$mutex>
  141. ( C<L<APR::ThreadMutex object|docs::2.0::api::APR::ThreadMutex>> )
  142.  
  143. =item since: subject to change
  144.  
  145. =back
  146.  
  147.  
  148. =head2 C<pool_get>
  149.  
  150. META: Autogenerated - needs to be reviewed/completed
  151.  
  152. META: should probably be renamed to pool(), like all other pool
  153. accessors
  154.  
  155. Get the pool used by this thread_mutex.
  156.  
  157.   $ret = $obj->pool_get();
  158.  
  159. =over 4
  160.  
  161. =item obj: C<$obj>
  162. ( C<L<APR::ThreadMutex object|docs::2.0::api::APR::ThreadMutex>> )
  163.  
  164.  
  165.  
  166. =item ret: C<$ret>
  167. ( C<L<APR::Pool object|docs::2.0::api::APR::Pool>> )
  168.  
  169. apr_pool_t the pool
  170.  
  171. =item since: subject to change
  172.  
  173. =back
  174.  
  175.  
  176.  
  177.  
  178.  
  179. =head2 C<trylock>
  180.  
  181. META: Autogenerated - needs to be reviewed/completed
  182.  
  183. Attempt to acquire the lock for the given mutex. If the mutex has already
  184. been acquired, the call returns immediately with APR_EBUSY. Note: it
  185. is important that the APR_STATUS_IS_EBUSY(s) macro be used to determine
  186. if the return value was APR_EBUSY, for portability reasons.
  187.  
  188.   $ret = $mutex->trylock();
  189.  
  190. =over 4
  191.  
  192. =item obj: C<$mutex>
  193. ( C<L<APR::ThreadMutex object|docs::2.0::api::APR::ThreadMutex>> )
  194.  
  195. the mutex on which to attempt the lock acquiring.
  196.  
  197. =item ret: C<$ret>
  198. (integer)
  199.  
  200.  
  201. =item since: subject to change
  202.  
  203. =back
  204.  
  205.  
  206.  
  207.  
  208.  
  209. =head2 C<unlock>
  210.  
  211. META: Autogenerated - needs to be reviewed/completed
  212.  
  213. Release the lock for the given mutex.
  214.  
  215.   $ret = $mutex->unlock();
  216.  
  217. =over 4
  218.  
  219. =item obj: C<$mutex>
  220. ( C<L<APR::ThreadMutex object|docs::2.0::api::APR::ThreadMutex>> )
  221.  
  222. the mutex from which to release the lock.
  223.  
  224. =item ret: C<$ret> ( integer )
  225.  
  226.  
  227. =item since: subject to change
  228.  
  229.  
  230. =back
  231.  
  232.  
  233.  
  234.  
  235. =head1 See Also
  236.  
  237. L<mod_perl 2.0 documentation|docs::2.0::index>.
  238.  
  239.  
  240.  
  241.  
  242. =head1 Copyright
  243.  
  244. mod_perl 2.0 and its core modules are copyrighted under
  245. The Apache Software License, Version 2.0.
  246.  
  247.  
  248.  
  249.  
  250. =head1 Authors
  251.  
  252. L<The mod_perl development team and numerous
  253. contributors|about::contributors::people>.
  254.  
  255. =cut
  256.  
  257.