« EvWatcher
EvWatcher::__construct »

EvWatcher::clear

(PECL ev >= 0.2.0)

EvWatcher::clear — Clear watcher pending status

説明

public function 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.

関連キーワード:
watcher   pending   EvWatcher   status   Clear   clear   callback   invoked   revents   bitset   construct   method   clears   nothing   Sometimes   useful   poll   instead   waiting   accomplished   case   Otherwise
関連する関数・ページ:
class.evwatcher   evwatcher.start   evwatcher.setcallback   evwatcher.construct   evwatcher.stop   evwatcher.getloop