Clear watcher pending status

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 .

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *