ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.pod
(Generate patch)

Comparing libev/ev.pod (file contents):
Revision 1.272 by root, Tue Nov 24 06:39:28 2009 UTC vs.
Revision 1.273 by root, Tue Nov 24 14:46:59 2009 UTC

1236watcher isn't pending it does nothing and returns C<0>. 1236watcher isn't pending it does nothing and returns C<0>.
1237 1237
1238Sometimes it can be useful to "poll" a watcher instead of waiting for its 1238Sometimes it can be useful to "poll" a watcher instead of waiting for its
1239callback to be invoked, which can be accomplished with this function. 1239callback to be invoked, which can be accomplished with this function.
1240 1240
1241=item ev_feed_event (struct ev_loop *, watcher *, int revents)
1242
1243Feeds the given event set into the event loop, as if the specified event
1244had happened for the specified watcher (which must be a pointer to an
1245initialised but not necessarily started event watcher). Obviously you must
1246not free the watcher as long as it has pending events.
1247
1248Stopping the watcher, letting libev invoke it, or calling
1249C<ev_clear_pending> will clear the pending event, even if the watcher was
1250not started in the first place.
1251
1252See also C<ev_feed_fd_event> and C<ev_feed_signal_event> for related
1253functions that do not need a watcher.
1254
1241=back 1255=back
1242 1256
1243 1257
1244=head2 ASSOCIATING CUSTOM DATA WITH A WATCHER 1258=head2 ASSOCIATING CUSTOM DATA WITH A WATCHER
1245 1259
3135 /* doh, nothing entered */; 3149 /* doh, nothing entered */;
3136 } 3150 }
3137 3151
3138 ev_once (STDIN_FILENO, EV_READ, 10., stdin_ready, 0); 3152 ev_once (STDIN_FILENO, EV_READ, 10., stdin_ready, 0);
3139 3153
3140=item ev_feed_event (struct ev_loop *, watcher *, int revents)
3141
3142Feeds the given event set into the event loop, as if the specified event
3143had happened for the specified watcher (which must be a pointer to an
3144initialised but not necessarily started event watcher).
3145
3146=item ev_feed_fd_event (struct ev_loop *, int fd, int revents) 3154=item ev_feed_fd_event (struct ev_loop *, int fd, int revents)
3147 3155
3148Feed an event on the given fd, as if a file descriptor backend detected 3156Feed an event on the given fd, as if a file descriptor backend detected
3149the given events it. 3157the given events it.
3150 3158

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines