GoLang EvWatcher::clear

request it (357)
GoLang replacement for PHP's EvWatcher::clear [edit | history]



Do you know a GoLang replacement for PHP's EvWatcher::clear? Write it!

PHP EvWatcher::clear

PHP original manual for EvWatcher::clear [ show | php.net ]

EvWatcher::clear

(PECL ev >= 0.2.0)

EvWatcher::clearClear watcher pending status

Description

public int EvWatcher::clear ( void )

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.

Parameters

This function has no parameters.

Return Values

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