Sets a function to be called when the IO condition, as specified by
condition becomes true for fd.
function will be called when the specified IO condition becomes
TRUE. The function is expected to clear whatever event caused the
IO condition to become true and return TRUE in order to be notified
when it happens again. If function returns FALSE then the watch
will be cancelled.
The return value of this function can be passed to Source.remove
to cancel the watch at any time that it exists.
The source will never close the fd -- you must do it yourself.
Sets a function to be called when the IO condition, as specified by condition becomes true for fd.
function will be called when the specified IO condition becomes TRUE. The function is expected to clear whatever event caused the IO condition to become true and return TRUE in order to be notified when it happens again. If function returns FALSE then the watch will be cancelled.
The return value of this function can be passed to Source.remove to cancel the watch at any time that it exists.
The source will never close the fd -- you must do it yourself.