Sophie

Sophie

distrib > Mageia > 7 > armv7hl > by-pkgid > 2b917e0437961edec048f1d15e2d7449 > files > 1064

php-manual-en-7.2.11-1.mga7.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The AtomicInteger class</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="pht-queue.unlock.html">pht\Queue::unlock</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="pht-atomicinteger.construct.html">pht\AtomicInteger::__construct</a></div>
 <div class="up"><a href="book.pht.html">pht</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="class.pht-atomicinteger" class="reference">

 <h1 class="title">The AtomicInteger class</h1>
 
  
 <div class="partintro"><p class="verinfo">(PECL pht &gt;= 0.0.1)</p>


  <div class="section" id="pht-atomicinteger.intro">
   <h2 class="title">Introduction</h2>
   <p class="para">
    The <strong class="classname">pht\AtomicInteger</strong> class is currently the only
    supported atomic value. It allows for an integer to be safely passed around
    between, and manipulated, by multiple threads. The methods exposed by this
    class do not need mutex locking, since they will acquire the internal mutex
    lock implicitly. <span class="methodname"><a href="pht-atomicinteger.lock.html" class="methodname">pht\AtomicInteger::lock()</a></span> and
    <span class="methodname"><a href="pht-atomicinteger.unlock.html" class="methodname">pht\AtomicInteger::unlock()</a></span> are still exposed, however,
    for when multiple operations involving the same
    <strong class="classname">pht\AtomicInteger</strong> object need to be grouped together.
   </p>
   <p class="para">
    The mutex locks of the atomic values are reentrant safe.
   </p>
  </div>


  <div class="section" id="pht-atomicinteger.synopsis">
   <h2 class="title">Class synopsis</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <strong class="classname">pht\AtomicInteger</strong>
     </span>

     <span class="oointerface">implements 
      <span class="interfacename"><a href="class.pht-threaded.html" class="interfacename">pht\Threaded</a></span>
     </span>
     {</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Methods */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">AtomicInteger</span> <span class="methodname"><a href="pht-atomicinteger.construct.html" class="methodname">__construct</a></span>
    ([ <span class="methodparam"><span class="type">int</span> <code class="parameter">$value</code><span class="initializer"> = 0</span></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span> <span class="methodname"><a href="pht-atomicinteger.dec.html" class="methodname">dec</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span> <span class="methodname"><a href="pht-atomicinteger.get.html" class="methodname">get</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span> <span class="methodname"><a href="pht-atomicinteger.inc.html" class="methodname">inc</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span> <span class="methodname"><a href="pht-atomicinteger.lock.html" class="methodname">lock</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span> <span class="methodname"><a href="pht-atomicinteger.set.html" class="methodname">set</a></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$value</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span> <span class="methodname"><a href="pht-atomicinteger.unlock.html" class="methodname">unlock</a></span>
    ( <span class="methodparam">void</span>
   )</div>


   }</div>


  </div>

 </div>

 


















































<h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="pht-atomicinteger.construct.html">pht\AtomicInteger::__construct</a> — AtomicInteger creation</li><li><a href="pht-atomicinteger.dec.html">pht\AtomicInteger::dec</a> — Decrements the atomic integer's value by one</li><li><a href="pht-atomicinteger.get.html">pht\AtomicInteger::get</a> — Gets the atomic integer's value</li><li><a href="pht-atomicinteger.inc.html">pht\AtomicInteger::inc</a> — Increments the atomic integer's value by one</li><li><a href="pht-atomicinteger.lock.html">pht\AtomicInteger::lock</a> — Acquires the atomic integer's mutex lock</li><li><a href="pht-atomicinteger.set.html">pht\AtomicInteger::set</a> — Sets the atomic integer's value</li><li><a href="pht-atomicinteger.unlock.html">pht\AtomicInteger::unlock</a> — Releases the atomic integer's mutex lock</li></ul>
</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="pht-queue.unlock.html">pht\Queue::unlock</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="pht-atomicinteger.construct.html">pht\AtomicInteger::__construct</a></div>
 <div class="up"><a href="book.pht.html">pht</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>