Fix: svn:keywords

Add: docs for evperiodic, evsignal, evstat
Fix: typos

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@328901 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Ruslan Osmanov 2012-12-27 06:41:57 +00:00
parent 27d57bc40b
commit 8b82a7e762
11 changed files with 236 additions and 271 deletions

View file

@ -28,6 +28,7 @@
<!-- {{{ Class synopsis -->
<classsynopsisinfo>
<ooclass>
<modifier>final</modifier>
<classname>Ev</classname>
</ooclass>
</classsynopsisinfo>
@ -606,7 +607,7 @@
<term><constant>Ev::BACKEND_EPOLL</constant></term>
<listitem>
<para>
Linux-specific <literal>epoll(7) backendf or both pre- and post-2.6.9 kernels</literal>
Linux-specific <literal>epoll(7)</literal> backend for both pre- and post-2.6.9 kernels
</para>
</listitem>
</varlistentry>
@ -687,7 +688,7 @@
<methodname>Ev::iteration</methodname>, <methodname>Ev::depth</methodname>
etc.) For <emphasis>custom loops</emphasis>(created with
<methodname>EvLoop::__construct</methodname>) you can access these values
via corresponding properties and methods of <classname>EvLoop</classname>
via corresponding properties and methods of the <classname>EvLoop</classname>
class.
</para>

View file

@ -14,12 +14,16 @@
<methodparam><type>double</type><parameter>offset</parameter></methodparam>
<methodparam><type>string</type><parameter>interval</parameter></methodparam>
<methodparam><type>callable</type><parameter>reschedule_cb</parameter></methodparam>
<methodparam><type>string</type><parameter>callback</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>data</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>priority</parameter></methodparam>
<methodparam><type>callable</type><parameter>callback</parameter></methodparam>
<methodparam
choice="opt"><type>mixed</type><parameter>data</parameter><initializer>&null;</initializer></methodparam>
<methodparam
choice="opt"><type>int</type><parameter>priority</parameter><initializer>0</initializer></methodparam>
</methodsynopsis>
<para>
Constructs EvPeriodic watcher object
Constructs EvPeriodic watcher object and starts it automatically. If you
need a stopped watcher consider using
<methodname>EvPeriodic::createStopped</methodname> method.
</para>
</refsect1>
@ -31,8 +35,7 @@
<term><parameter>offset</parameter></term>
<listitem>
<para>
See <link linkend="ev.periodic-modes">Periodic watcher operation
modes</link>
See <link linkend="ev.periodic-modes">Periodic watcher operation modes</link>
</para>
</listitem>
</varlistentry>
@ -40,8 +43,7 @@
<term><parameter>interval</parameter></term>
<listitem>
<para>
See <link linkend="ev.periodic-modes">Periodic watcher operation
modes</link>
See <link linkend="ev.periodic-modes">Periodic watcher operation modes</link>
</para>
</listitem>
</varlistentry>
@ -49,7 +51,7 @@
<term><parameter>reschedule_cb</parameter></term>
<listitem>
<para>
Rescheduler callback. You can pass &null;.
Reschedule callback. You can pass &null;.
See <link linkend="ev.periodic-modes">Periodic watcher operation
modes</link>
</para>
@ -59,7 +61,7 @@
<term><parameter>callback</parameter></term>
<listitem>
<para>
See <link linkend="ev.watcher-callbacks">Watcher callbacks</link>.
</para>
</listitem>
</varlistentry>
@ -67,7 +69,7 @@
<term><parameter>data</parameter></term>
<listitem>
<para>
Custom data associated with the watcher.
</para>
</listitem>
</varlistentry>
@ -75,7 +77,7 @@
<term><parameter>priority</parameter></term>
<listitem>
<para>
<link linkend="ev.constants.watcher-pri">Watcher priority</link>
</para>
</listitem>
</varlistentry>
@ -85,37 +87,73 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns EvPeriodic object on success.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>EvPeriodic::__construct</function> example</title>
<programlisting role="php">
<example>
<title>Periodic timer. Use reschedule callback</title>
<programlisting role="php">
<![CDATA[
<?php
// Tick each 10.5 seconds
/* ... */
function reschedule_cb ($watcher, $now) {
return $now + (10.5. - fmod($now, 10.5));
}
$w = new EvPeriodic(0., 0., "reschedule_cb", function ($w, $revents) {
echo time(), PHP_EOL;
});
Ev::run();
?>
]]>
</programlisting>
</example>
<example>
<title>Periodic timer. Tick every 10.5 seconds starting at now</title>
<programlisting role="php">
<![CDATA[
<?php
// Tick every 10.5 seconds starting at now
$w = new EvPeriodic(fmod(Ev::now(), 10.5), 10.5, NULL, function ($w, $revents) {
echo time(), PHP_EOL;
});
Ev::run();
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
...
]]>
</screen>
</example>
</refsect1>
</programlisting>
</example>
<example>
<title>Hourly watcher</title>
<programlisting role="php">
<![CDATA[
<?php
$hourly = EvPeriodic(0, 3600, NULL, function () {
echo "once per hour\n";
};
?>
]]>
</programlisting>
</example>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member></member>
<member>
<link linkend="ev.periodic-modes">Periodic watcher operation modes</link>
</member>
<member><classname>EvTimer</classname></member>
<member><methodname>EvPeriodic::createStopped</methodname></member>
</simplelist>
</refsect1>

View file

@ -4,25 +4,28 @@
<refentry xml:id="evperiodic.createstopped" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>EvPeriodic::createStopped</refname>
<refpurpose>The createStopped purpose</refpurpose>
<refpurpose>Create a stopped EvPeriodic watcher</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <modifier>static</modifier> <type>void</type><methodname>EvPeriodic::createStopped</methodname>
<methodparam><type>string</type><parameter>offset</parameter></methodparam>
<methodparam><type>string</type><parameter>interval</parameter></methodparam>
<methodparam><type>string</type><parameter>callback</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>data</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>priority</parameter></methodparam>
<modifier>public</modifier> <modifier>static</modifier> <type>EvPeriodic</type><methodname>EvPeriodic::createStopped</methodname>
<methodparam><type>double</type><parameter>offset</parameter></methodparam>
<methodparam><type>double</type><parameter>interval</parameter></methodparam>
<methodparam><type>callable</type><parameter>reschedule_cb</parameter></methodparam>
<methodparam><type>callable</type><parameter>callback</parameter></methodparam>
<methodparam
choice="opt"><type>mixed</type><parameter>data</parameter><initializer>&null;</initializer></methodparam>
<methodparam
choice="opt"><type>int</type><parameter>priority</parameter><initializer>0</initializer></methodparam>
</methodsynopsis>
<para>
Create EvPeriodic object. Unlike
<methodname>EvPeriodic::__construct</methodname> this method doesn&apos;t start
the watcher automatically.
</para>
&warn.undocumented.func;
</refsect1>
<refsect1 role="parameters">
@ -32,7 +35,7 @@
<term><parameter>offset</parameter></term>
<listitem>
<para>
See <link linkend="ev.periodic-modes">Periodic watcher operation modes</link>
</para>
</listitem>
</varlistentry>
@ -40,7 +43,17 @@
<term><parameter>interval</parameter></term>
<listitem>
<para>
See <link linkend="ev.periodic-modes">Periodic watcher operation modes</link>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>reschedule_cb</parameter></term>
<listitem>
<para>
Reschedule callback. You can pass &null;.
See <link linkend="ev.periodic-modes">Periodic watcher operation
modes</link>
</para>
</listitem>
</varlistentry>
@ -48,7 +61,7 @@
<term><parameter>callback</parameter></term>
<listitem>
<para>
See <link linkend="ev.watcher-callbacks">Watcher callbacks</link>.
</para>
</listitem>
</varlistentry>
@ -56,7 +69,7 @@
<term><parameter>data</parameter></term>
<listitem>
<para>
Custom data associated with the watcher.
</para>
</listitem>
</varlistentry>
@ -64,7 +77,7 @@
<term><parameter>priority</parameter></term>
<listitem>
<para>
<link linkend="ev.constants.watcher-pri">Watcher priority</link>
</para>
</listitem>
</varlistentry>
@ -74,37 +87,15 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns EvPeriodic watcher object on success.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>EvPeriodic::createStopped</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
/* ... */
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
...
]]>
</screen>
</example>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member></member>
<member><methodname>EvPeriodic::__construct</methodname></member>
<member><methodname>EvTimer::createStopped</methodname></member>
</simplelist>
</refsect1>

View file

@ -4,22 +4,20 @@
<refentry xml:id="evperiodic.set" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>EvPeriodic::set</refname>
<refpurpose>The set purpose</refpurpose>
<refpurpose>Configures the watcher</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>EvPeriodic::set</methodname>
<methodparam><type>string</type><parameter>offset</parameter></methodparam>
<methodparam><type>string</type><parameter>interval</parameter></methodparam>
<methodparam><type>double</type><parameter>offset</parameter></methodparam>
<methodparam><type>double</type><parameter>interval</parameter></methodparam>
</methodsynopsis>
<para>
(Re-)Configures EvPeriodic watcher
</para>
&warn.undocumented.func;
</refsect1>
<refsect1 role="parameters">
@ -29,7 +27,8 @@
<term><parameter>offset</parameter></term>
<listitem>
<para>
The same meaning as for <methodname>EvPeriodic::__construct</methodname>.
See <link linkend="ev.periodic-modes">Periodic watcher operation modes</link>
</para>
</listitem>
</varlistentry>
@ -37,7 +36,8 @@
<term><parameter>interval</parameter></term>
<listitem>
<para>
The same meaning as for <methodname>EvPeriodic::__construct</methodname>.
See <link linkend="ev.periodic-modes">Periodic watcher operation modes</link>
</para>
</listitem>
</varlistentry>
@ -47,40 +47,10 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>EvPeriodic::set</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
/* ... */
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
...
]]>
</screen>
</example>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member></member>
</simplelist>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -4,7 +4,7 @@
<refentry xml:id="evprepare.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>EvPrepare::__construct</refname>
<refpurpose>The __construct purpose</refpurpose>
<refpurpose>Constructs EvPrepare watcher object</refpurpose>
</refnamediv>
<refsect1 role="description">
@ -16,11 +16,11 @@
<methodparam choice="opt"><type>string</type><parameter>priority</parameter></methodparam>
</methodsynopsis>
<para>
Constructs EvPrepare watcher object. And starts the watcher automatically.
If need a stopped watcher consider using
<methodname>EvPrepare::createStopped</methodname>
</para>
&warn.undocumented.func;
</refsect1>
<refsect1 role="parameters">
@ -30,7 +30,7 @@
<term><parameter>callback</parameter></term>
<listitem>
<para>
See <link linkend="ev.watcher-callbacks">Watcher callbacks</link>.
</para>
</listitem>
</varlistentry>
@ -38,7 +38,7 @@
<term><parameter>data</parameter></term>
<listitem>
<para>
Custom data associated with the watcher.
</para>
</listitem>
</varlistentry>
@ -46,7 +46,7 @@
<term><parameter>priority</parameter></term>
<listitem>
<para>
<link linkend="ev.constants.watcher-pri">Watcher priority</link>
</para>
</listitem>
</varlistentry>
@ -56,37 +56,14 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns EvPrepare object on success.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>EvPrepare::__construct</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
/* ... */
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
...
]]>
</screen>
</example>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member></member>
<member><classname>EvCheck</classname></member>
</simplelist>
</refsect1>

View file

@ -4,23 +4,25 @@
<refentry xml:id="evprepare.createstopped" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>EvPrepare::createStopped</refname>
<refpurpose>The createStopped purpose</refpurpose>
<refpurpose>Creates a stopped instance of EvPrepare watcher</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <modifier>static</modifier> <type>object</type><methodname>EvPrepare::createStopped</methodname>
<methodparam><type>string</type><parameter>callback</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>data</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>priority</parameter></methodparam>
<modifier>public</modifier> <modifier>static</modifier> <type>EvPrepare</type><methodname>EvPrepare::createStopped</methodname>
<methodparam><type>callable</type><parameter>callback</parameter></methodparam>
<methodparam
choice="opt"><type>mixed</type><parameter>data</parameter><initializer>&null;</initializer></methodparam>
<methodparam
choice="opt"><type>int</type><parameter>priority</parameter><initializer>0</initializer></methodparam>
</methodsynopsis>
<para>
Creates a stopped instance of EvPrepare watcher. Unlike
<methodname>EvPrepare::__construct</methodname>, this method doesn&apos;
start the watcher automatically.
</para>
&warn.undocumented.func;
</refsect1>
<refsect1 role="parameters">
@ -30,7 +32,7 @@
<term><parameter>callback</parameter></term>
<listitem>
<para>
See <link linkend="ev.watcher-callbacks">Watcher callbacks</link>.
</para>
</listitem>
</varlistentry>
@ -38,7 +40,7 @@
<term><parameter>data</parameter></term>
<listitem>
<para>
Custom data associated with the watcher.
</para>
</listitem>
</varlistentry>
@ -46,7 +48,7 @@
<term><parameter>priority</parameter></term>
<listitem>
<para>
<link linkend="ev.constants.watcher-pri">Watcher priority</link>
</para>
</listitem>
</varlistentry>
@ -56,37 +58,15 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Return EvPrepare object on success.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>EvPrepare::createStopped</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
/* ... */
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
...
]]>
</screen>
</example>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member></member>
<member><methodname>EvPrepare::__construct</methodname></member>
<member><methodname>EvWatcher::start</methodname></member>
</simplelist>
</refsect1>

View file

@ -11,9 +11,32 @@
<!-- {{{ EvSignal intro -->
<section xml:id="evsignal.intro">
&reftitle.intro;
<para>
<para>
<classname>EvSignal</classname> watchers will trigger an event when the process receives a specific
signal one or more times. Even though signals are very asynchronous, <emphasis>libev</emphasis>
will try its best to deliver signals synchronously, i.e. as part of the
normal event processing, like any other event.
</para>
<para>
You can configure as many watchers as you like for the same signal, but
only within the same loop, i.e. you can watch for
<constant>SIGINT</constant> in the default loop and for
<constant>SIGIO</constant> in another loop, but you cannot watch for
<constant>SIGINT</constant> in both the default loop and another loop at
the same time. At the moment, <constant>SIGCHLD</constant> is permanently
tied to the default loop.
</para>
<para>
If possible and supported, <emphasis>libev</emphasis> will install its
handlers with <literal>SA_RESTART</literal> (or equivalent) behaviour
enabled, so system calls should not be unduly interrupted. If you have a
problem with system calls getting interrupted by signals you can block all
signals in an <classname>EvCheck</classname> watcher and unblock them in a
<classname>EvPrepare</classname> watcher.
</para>
</section>
<!-- }}} -->
@ -42,6 +65,8 @@
<varname linkend="evsignal.props.signum">signum</varname>
</fieldsynopsis>
<classsynopsisinfo role="comment">&InheritedProperties;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('evwatcher.synopsis')/descendant::db:fieldsynopsis)" />
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.evsignal')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
@ -59,34 +84,13 @@
<section xml:id="evsignal.props">
&reftitle.properties;
<variablelist>
<varlistentry xml:id="evsignal.props.is-active">
<term><varname>is_active</varname></term>
<listitem>
<para></para>
</listitem>
</varlistentry>
<varlistentry xml:id="evsignal.props.data">
<term><varname>data</varname></term>
<listitem>
<para></para>
</listitem>
</varlistentry>
<varlistentry xml:id="evsignal.props.is-pending">
<term><varname>is_pending</varname></term>
<listitem>
<para></para>
</listitem>
</varlistentry>
<varlistentry xml:id="evsignal.props.priority">
<term><varname>priority</varname></term>
<listitem>
<para></para>
</listitem>
</varlistentry>
<varlistentry xml:id="evsignal.props.signum">
<term><varname>signum</varname></term>
<listitem>
<para></para>
<para>Signal number. You can use constants exported by
<emphasis>pcntl</emphasis> extension. See also
<literal>signal(7)</literal> man page.
</para>
</listitem>
</varlistentry>
</variablelist>

View file

@ -4,24 +4,25 @@
<refentry xml:id="evsignal.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>EvSignal::__construct</refname>
<refpurpose>The __construct purpose</refpurpose>
<refpurpose>Constructs EvPeriodic watcher object</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <methodname>EvSignal::__construct</methodname>
<methodparam><type>string</type><parameter>signum</parameter></methodparam>
<methodparam><type>string</type><parameter>callback</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>data</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>priority</parameter></methodparam>
<methodparam><type>int</type><parameter>signum</parameter></methodparam>
<methodparam><type>callable</type><parameter>callback</parameter></methodparam>
<methodparam
choice="opt"><type>mixed</type><parameter>data</parameter><initializer>&null;</initializer></methodparam>
<methodparam
choice="opt"><type>int</type><parameter>priority</parameter><initializer>0</initializer></methodparam>
</methodsynopsis>
<para>
Constructs EvPeriodic watcher object. If you need a stopped watcher,
consider using <methodname>EvSignal::createStopped</methodname>.
</para>
&warn.undocumented.func;
</refsect1>
<refsect1 role="parameters">
@ -31,7 +32,8 @@
<term><parameter>signum</parameter></term>
<listitem>
<para>
Signal number. You can use one exported by <emphasis>pcntl</emphasis>
extension. See also <literal>signal(7)</literal> man page.
</para>
</listitem>
</varlistentry>
@ -39,7 +41,7 @@
<term><parameter>callback</parameter></term>
<listitem>
<para>
See <link linkend="ev.watcher-callbacks">Watcher callbacks</link>.
</para>
</listitem>
</varlistentry>
@ -47,7 +49,7 @@
<term><parameter>data</parameter></term>
<listitem>
<para>
Custom data associated with the watcher.
</para>
</listitem>
</varlistentry>
@ -55,7 +57,7 @@
<term><parameter>priority</parameter></term>
<listitem>
<para>
<link linkend="ev.constants.watcher-pri">Watcher priority</link>
</para>
</listitem>
</varlistentry>
@ -65,37 +67,33 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns EvSignal object on success.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>EvSignal::__construct</function> example</title>
<programlisting role="php">
<example>
<title>Handle SIGTERM signal</title>
<programlisting role="php">
<![CDATA[
<?php
/* ... */
$w = new EvSignal(SIGTERM, function ($watcher) {
echo "SIGTERM received\n";
$watcher->stop();
});
Ev::run();
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
...
]]>
</screen>
</example>
</programlisting>
</example>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member></member>
<member><methodname>EvSignal::createStopped</methodname></member>
</simplelist>
</refsect1>

View file

@ -4,21 +4,19 @@
<refentry xml:id="evsignal.set" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>EvSignal::set</refname>
<refpurpose>The set purpose</refpurpose>
<refpurpose>Configures the watcher</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>EvSignal::set</methodname>
<methodparam><type>string</type><parameter>signum</parameter></methodparam>
<methodparam><type>int</type><parameter>signum</parameter></methodparam>
</methodsynopsis>
<para>
Configures the watcher.
</para>
&warn.undocumented.func;
</refsect1>
<refsect1 role="parameters">
@ -28,7 +26,7 @@
<term><parameter>signum</parameter></term>
<listitem>
<para>
Signal number. The same as for <methodname>EvSignal::__construct</methodname>
</para>
</listitem>
</varlistentry>
@ -38,40 +36,10 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>EvSignal::set</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
/* ... */
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
...
]]>
</screen>
</example>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member></member>
</simplelist>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -12,7 +12,41 @@
<section xml:id="evstat.intro">
&reftitle.intro;
<para>
<classname>EvStat</classname> monitors a file system path for attribute
changes. It calls <emphasis>stat()</emphasis> on that path in regular
intervals(or when the OS signals it changed) and sees if it changed
compared to the last time, invoking the callback if it did.
</para>
<para>
The path does not need to exist: changing from "path exists" to "path does
not exist" is a status change like any other. The condition "path does not
exist" is signified by the item <constant>'nlink'</constant> being 0 (which is otherwise always forced to be at
least 1) and all the other fields of the Statdata object having unspecified
contents.
</para>
<para>
The path must not end in a slash or contain special components such as . or
... The path should be absolute: if it is relative and your working
directory changes, then the behaviour is undefined.
</para>
<para>
Since there is no portable change notification interface available, the
portable implementation simply calls stat() regularly on the path to see if
it changed somehow. You can specify a recommended polling interval for this
case. If you specify a polling interval of 0.0 (highly recommended!) then a
suitable, unspecified default value will be used (which you can expect to
be around five seconds, although this might change dynamically). libev will
also impose a minimum interval which is currently around 0.1, but thats
usually overkill.
</para>
<para>
This watcher type is not meant for massive numbers of Stat watchers, as
even with OS-supported change notifications, this can be
resource-intensive.
</para>
</section>
<!-- }}} -->

View file

@ -12,7 +12,11 @@
<section xml:id="evwatcher.intro">
&reftitle.intro;
<para>
<classname>EvWatcher</classname> is a base class for all
watchers(<classname>EvCheck</classname>, <classname>EvChild</classname>
etc.). Since <classname>EvWatcher</classname>&apos;s constructor is
<modifier>abstract</modifier>, you can't(and don't need to) create
EvWatcher objects directly.
</para>
</section>
<!-- }}} -->
@ -88,8 +92,8 @@
<varlistentry xml:id="evwatcher.props.priority">
<term><varname>priority</varname></term>
<listitem>
<para><type>Integer</type> between <constant>EV_MINPRI</constant> and
<constant>EV_MAXPRI</constant>. Pending watchers with higher priority
<para><type>Integer</type> between <constant>Ev::MINPRI</constant> and
<constant>Ev::MAXPRI</constant>. Pending watchers with higher priority
will be invoked before watchers with lower priority, but priority will
not keep watchers from being executed(except for
<classname>EvIdle</classname> watchers). If you need to suppress