略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: EvWatcher::clear

2024-11-13

EvWatcher::clear

(PECL ev >= 0.2.0)

EvWatcher::clearClear watcher pending status

说明

public EvWatcher::clear(): int

If the watcher is pending, this method clears its pending status and returns its revents bitset(as if its callback was invoked). If the watcher isn't pending it does nothing and returns 0 .

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.

参数

此函数没有参数。

返回值

In case if the watcher is pending, returns revents bitset as if the watcher callback had been invoked. Otherwise returns 0 .

add a noteadd a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/evwatcher.clear.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3