<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.ev.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ja',
  ),
  'this' => 
  array (
    0 => 'ev.run.php',
    1 => 'Ev::run',
    2 => 'イベントのチェックとデフォルトループのコールバックの呼び出しを開始する',
  ),
  'up' => 
  array (
    0 => 'class.ev.php',
    1 => 'Ev',
  ),
  'prev' => 
  array (
    0 => 'ev.resume.php',
    1 => 'Ev::resume',
  ),
  'next' => 
  array (
    0 => 'ev.sleep.php',
    1 => 'Ev::sleep',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ja',
    'path' => 'reference/ev/ev/run.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="ev.run" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Ev::run</h1>
  <p class="verinfo">(PECL ev &gt;= 0.2.0)</p><p class="refpurpose"><span class="refname">Ev::run</span> &mdash; <span class="dc-title">イベントのチェックとデフォルトループのコールバックの呼び出しを開始する</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-ev.run-description">
  <h3 class="title">説明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">final</span>
   <span class="modifier">public</span>
   <span class="modifier">static</span>
   <span class="methodname"><strong>Ev::run</strong></span>(<span class="methodparam">
    
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$flags</code>
   <span class="initializer"> = ?</span></span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>

  <p class="simpara">
   イベントのチェックとデフォルトループのコールバックの呼び出しを開始します。
   コールバックが <span class="methodname"><a href="ev.stop.php" class="methodname">Ev::stop()</a></span> メソッドを読んだとき、
   あるいは flags がゼロ以外のとき (この場合の戻り値は true)
   に結果を返します。あるいは、ループを参照するアクティブなウォッチャーがないとき
   (<span class="methodname"><a href="evwatcher.keepalive.php" class="methodname">EvWatcher::keepalive()</a></span> が <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>)
   のときにも結果を返し、このときに返す値は <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> になります。
   戻り値の解釈は、一般的に、
   <em>もし <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> ならまだ作業が残っている</em>
   となります。
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-ev.run-parameters">
  <h3 class="title">パラメータ</h3>
  <dl>
   
    <dt>
     <code class="parameter">flags</code>
    </dt>
    <dd>
     <p class="para">
      オプションのパラメータで、以下のいずれかになります。
      <table class="doctable table">
       <caption><strong>
         <code class="parameter">flags</code> に指定できる値の一覧
       </strong></caption>
       
        <thead>
         <tr>
          <th>
           <code class="parameter">flags</code>
          </th>
          <th>説明</th>
         </tr>

        </thead>

        <tbody class="tbody">
         <tr>
          <td>
           <strong><code>0</code></strong>
          </td>
          <td>上で述べたデフォルトの挙動。</td>
         </tr>

         <tr>
          <td>
           <strong><code><a href="class.ev.php#ev.constants.run-once">Ev::RUN_ONCE</a></code></strong>
          </td>
          <td>最大 1 件ブロックします (待つけれども繰り返しません)。</td>
         </tr>

         <tr>
          <td>
           <strong><code><a href="class.ev.php#ev.constants.run-nowait">Ev::RUN_NOWAIT</a></code></strong>
          </td>
          <td>まったくブロックしません (イベントを取得して処理しますが、待ちません)。</td>
         </tr>

        </tbody>
       
      </table>

     </p>
     <span class="simpara">
      <a href="class.ev.php#ev.constants.run-flags" class="link">実行フラグ定数</a> も参照ください。
     </span>
    </dd>
   
  </dl>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-ev.run-returnvalues">
  <h3 class="title">戻り値</h3>
  <p class="simpara">
   値を返しません。
  </p>
 </div>

 <div class="refsect1 seealso" id="refsect1-ev.run-seealso">
  <h3 class="title">参考</h3>
  <ul class="simplelist">
   <li>
    <span class="methodname"><a href="ev.stop.php" class="methodname" rel="rdfs-seeAlso">Ev::stop()</a> - デフォルトのイベントループを止める</span>
   </li>
   <li>
    <span class="methodname"><a href="evloop.run.php" class="methodname" rel="rdfs-seeAlso">EvLoop::run()</a> - Begin checking for events and calling callbacks for the loop</span>
   </li>
  </ul>
 </div>

</div><?php manual_footer($setup); ?>