uTools-Manuals/docs/php/event_base_priority_init.html
2019-04-28 19:00:34 +08:00

78 lines
2.5 KiB
HTML

<!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>Set the number of event priority levels</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.event-base-priority-init" class="refentry">
<div class="refnamediv">
<h1 class="refname">event_base_priority_init</h1>
<p class="verinfo">(PECL libevent &gt;= 0.0.2)</p><p class="refpurpose"><span class="refname">event_base_priority_init</span> &mdash; <span class="dc-title">Set the number of event priority levels</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.event-base-priority-init-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>event_base_priority_init</strong></span>
( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$event_base</code></span>
, <span class="methodparam"><span class="type">int</span> <code class="parameter">$npriorities</code></span>
) : <span class="type">bool</span></div>
<p class="para rdfs-comment">
Sets the number of different event priority levels.
</p>
<p class="para">
By default all events are scheduled with the same priority
(<code class="parameter">npriorities</code>/2).
Using <span class="function"><strong>event_base_priority_init()</strong></span> you can change the number
of event priority levels and then set a desired priority for each event.
</p>
</div>
<div class="refsect1 parameters" id="refsect1-function.event-base-priority-init-parameters">
<h3 class="title">参数</h3>
<p class="para">
<dl>
<dt>
<code class="parameter">event_base</code></dt>
<dd>
<p class="para">
Valid event base resource.
</p>
</dd>
<dt>
<code class="parameter">npriorities</code></dt>
<dd>
<p class="para">
The number of event priority levels.
</p>
</dd>
</dl>
</p>
</div>
<div class="refsect1 returnvalues" id="refsect1-function.event-base-priority-init-returnvalues">
<h3 class="title">返回值</h3>
<p class="para">
<span class="function"><strong>event_base_priority_init()</strong></span> returns <strong><code>TRUE</code></strong> on success or <strong><code>FALSE</code></strong> on error.
</p>
</div>
</div></div></div></body></html>