<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/book.sync.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'class.syncmutex.php',
    1 => 'SyncMutex',
    2 => 'The SyncMutex class',
  ),
  'up' => 
  array (
    0 => 'book.sync.php',
    1 => 'Sync',
  ),
  'prev' => 
  array (
    0 => 'sync.installation.php',
    1 => 'Встановлення',
  ),
  'next' => 
  array (
    0 => 'syncmutex.construct.php',
    1 => 'SyncMutex::__construct',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/sync/syncmutex.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/class.syncmutex.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="class.syncmutex" class="reference">

 <h1 class="title">The SyncMutex class</h1>
 

 <div class="partintro"><p class="verinfo">(PECL sync &gt;= 1.0.0)</p>


  <div class="section" id="syncmutex.intro">
   <h2 class="title">Вступ</h2>
   <p class="para">
    A cross-platform, native implementation of named and unnamed countable mutex objects.
   </p>
   <p class="para">
    A mutex is a mutual exclusion object that restricts access to a shared resource (e.g. a file) to a single instance.
    Countable mutexes acquire the mutex a single time and internally track the number of times the mutex is locked.
    The mutex is unlocked as soon as it goes out of scope or is unlocked the same number of times that it was locked.
   </p>
  </div>


  <div class="section" id="syncmutex.synopsis">
   <h2 class="title">Короткий огляд класу</h2>


   <div class="classsynopsis">
    <span class="ooclass"><strong class="classname"></strong></span>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">class</span> <strong class="classname">SyncMutex</strong>
     </span>
     {</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Методи */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="syncmutex.construct.php" class="methodname">__construct</a></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$name</code><span class="initializer"> = ?</span></span>)</div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="syncmutex.lock.php" class="methodname">lock</a></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$wait</code><span class="initializer"> = -1</span></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="syncmutex.unlock.php" class="methodname">unlock</a></span>(<span class="methodparam"><span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span> <code class="parameter">$all</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong></span></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

   }</div>


  </div>

 </div>

 





















<h2>Зміст</h2><ul class="chunklist chunklist_reference"><li><a href="syncmutex.construct.php">SyncMutex::__construct</a> — Constructs a new SyncMutex object</li><li><a href="syncmutex.lock.php">SyncMutex::lock</a> — Waits for an exclusive lock</li><li><a href="syncmutex.unlock.php">SyncMutex::unlock</a> — Unlocks the mutex</li></ul>
</div>
<?php manual_footer($setup); ?>