Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 827

php-manual-en-5.5.7-1.mga4.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 EvIdle class</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="evfork.createstopped.html">EvFork::createStopped</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="evidle.construct.html">EvIdle::__construct</a></div>
 <div class="up"><a href="book.ev.html">Ev</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="class.evidle" class="reference">
 <h1 class="title">The EvIdle class</h1>
 
 <div class="partintro"><p class="verinfo">(PECL ev &gt;= 0.2.0)</p>

  <div class="section" id="evidle.intro">
   <h2 class="title">Introduction</h2>
   <p class="para">
    <strong class="classname">EvIdle</strong>
    watchers trigger events when no other events of the same or higher
    priority are pending (
    <a href="class.evprepare.html" class="classname">EvPrepare</a>
    ,
    <a href="class.evcheck.html" class="classname">EvCheck</a>
    and other
    <strong class="classname">EvIdle</strong>
    watchers do not count as receiving
    <em class="emphasis">events</em>
    ).
   </p>
   <p class="para">
    Thus, as long as the process is busy handling sockets or timeouts(or even
    signals) of the same or higher priority it will not be triggered. But when
    the process is in idle(or only lower-priority watchers are pending), the
    <strong class="classname">EvIdle</strong>
    watchers are being called once per event loop iteration - until stopped,
    that is, or the process receives more events and becomes busy again with
    higher priority stuff.
   </p>
   <p class="para">
    Apart from keeping the process non-blocking(which is a useful on its own
    sometimes),
    <strong class="classname">EvIdle</strong>
    watchers are a good place to do
    <em class="emphasis">&quot;pseudo-background processing&quot;</em>
    , or delay processing stuff to after the event loop has handled all
    outstanding events.
   </p>
   <p class="para">
    The most noticeable effect is that as long as any
    <em class="emphasis">idle</em>
    watchers are active, the process will
    <em class="emphasis">not</em>
    block when waiting for new events.
   </p>
  </div>

  <div class="section" id="evidle.synopsis">
   <h2 class="title">Class synopsis</h2>


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

    <div class="classsynopsisinfo">
     <span class="ooclass">
      <strong class="classname">EvIdle</strong>
     </span>
     <span class="ooclass">
      <span class="modifier">extends</span>
      <a href="class.evwatcher.html" class="classname">EvWatcher</a>
     </span>
     {</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Inherited properties */</div>
    <div class="fieldsynopsis">
     <span class="modifier">public</span>
      <var class="varname"><a href="class.evwatcher.html#evwatcher.props.is-active">$<var class="varname">is_active</var></a></var>
    ;</div>
<div class="fieldsynopsis">
     <span class="modifier">public</span>
      <var class="varname"><a href="class.evwatcher.html#evwatcher.props.data">$<var class="varname">data</var></a></var>
    ;</div>
<div class="fieldsynopsis">
     <span class="modifier">public</span>
      <var class="varname"><a href="class.evwatcher.html#evwatcher.props.is-pending">$<var class="varname">is_pending</var></a></var>
    ;</div>
<div class="fieldsynopsis">
     <span class="modifier">public</span>
      <var class="varname"><a href="class.evwatcher.html#evwatcher.props.priority">$<var class="varname">priority</var></a></var>
    ;</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Methods */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
    <span class="methodname"><a href="evidle.construct.html" class="methodname">__construct</a></span>
    ( <span class="methodparam">
    <span class="type"><a href="language.types.callable.html" class="type callable">callable</a></span>
     <code class="parameter">$callback</code>
   </span>
   [, <span class="methodparam">
    <span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span>
     <code class="parameter">$data</code>
   </span>
   [, <span class="methodparam">
    <span class="type">int</span>
     <code class="parameter">$priority</code>
   </span>
  ]] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">final</span>
   <span class="modifier">public</span>
   <span class="modifier">static</span>
   <span class="type">object</span>
    <span class="methodname"><a href="evidle.createstopped.html" class="methodname">createStopped</a></span>
    ( <span class="methodparam">
    <span class="type">string</span>
     <code class="parameter">$callback</code>
   </span>
   [, <span class="methodparam">
    <span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span>
     <code class="parameter">$data</code>
   </span>
   [, <span class="methodparam">
    <span class="type">int</span>
     <code class="parameter">$priority</code>
   </span>
  ]] )</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Inherited methods */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="type">int</span>
    <span class="methodname"><a href="evwatcher.clear.html" class="methodname">EvWatcher::clear</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">abstract</span>
   <span class="modifier">public</span>
    <span class="methodname"><a href="evwatcher.construct.html" class="methodname">EvWatcher::__construct</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="evwatcher.feed.html" class="methodname">EvWatcher::feed</a></span>
    ( <span class="methodparam">
    <span class="type">int</span>
     <code class="parameter">$revents</code>
   </span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="type">EvLoop</span>
    <span class="methodname"><a href="evwatcher.getloop.html" class="methodname">EvWatcher::getLoop</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="evwatcher.invoke.html" class="methodname">EvWatcher::invoke</a></span>
    ( <span class="methodparam">
    <span class="type">int</span>
     <code class="parameter">$revents</code>
   </span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="type">bool</span>
    <span class="methodname"><a href="evwatcher.keepalive.html" class="methodname">EvWatcher::keepalive</a></span>
    ([ <span class="methodparam">
    <span class="type">bool</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="evwatcher.setcallback.html" class="methodname">EvWatcher::setCallback</a></span>
    ( <span class="methodparam">
    <span class="type"><a href="language.types.callable.html" class="type callable">callable</a></span>
     <code class="parameter">$callback</code>
   </span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="type">void</span>
    <span class="methodname"><a href="evwatcher.start.html" class="methodname">EvWatcher::start</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="evwatcher.stop.html" class="methodname">EvWatcher::stop</a></span>
    ( <span class="methodparam">void</span>
   )</div>

   }</div>

  </div>

 </div>

 











<h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="evidle.construct.html">EvIdle::__construct</a> — Constructs the EvIdle watcher object</li><li><a href="evidle.createstopped.html">EvIdle::createStopped</a> — Creates instance of a stopped EvIdle watcher object</li></ul>
</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="evfork.createstopped.html">EvFork::createStopped</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="evidle.construct.html">EvIdle::__construct</a></div>
 <div class="up"><a href="book.ev.html">Ev</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>