php-doc-en/reference/ev/evwatcher/clear.xml
Ruslan Osmanov 8d666e8198 Applied XML formatting
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@328910 c90b9560-bf6c-de11-be94-00142212c4b1
2012-12-27 17:33:55 +00:00

68 lines
1.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="evwatcher.clear" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>EvWatcher::clear</refname>
<refpurpose>Clear watcher pending status</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier>
<type>int</type>
<methodname>EvWatcher::clear</methodname>
<void />
</methodsynopsis>
<para>
If the watcher is pending, this method clears its
<varname>pending</varname>
status and returns its
<varname>revents</varname>
bitset(as if its callback was invoked). If the watcher isn&apos;t pending
it does nothing and returns
<constant>0</constant>
.
</para>
<para>
Sometimes it can be useful to "poll" a watcher instead of waiting for its
callback to be invoked, which can be accomplished with this function.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
&no.function.parameters;
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
In case if the watcher is pending, returns
<varname>revents</varname>
bitset as if the
<link
linkend="ev.watcher-callbacks">watcher callback</link>
had been invoked. Otherwise returns
<constant>0</constant>
.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->