Php/docs/evwatcher.clear

提供:Dev Guides
< Php
2020年12月14日 (月) 10:04時点におけるNotes (トーク | 投稿記録)による版 (autoload)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先:案内検索

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 .