ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/EV/EV.pm
(Generate patch)

Comparing EV/EV.pm (file contents):
Revision 1.64 by root, Sat Dec 8 02:55:13 2007 UTC vs.
Revision 1.65 by root, Sat Dec 8 14:12:03 2007 UTC

160 160
161EV::once doesn't return anything: the watchers stay active till either 161EV::once doesn't return anything: the watchers stay active till either
162of them triggers, then they will be stopped and freed, and the callback 162of them triggers, then they will be stopped and freed, and the callback
163invoked. 163invoked.
164 164
165=item EV::feed_fd_event ($fd, $revents)
166
167Feed an event on a file descriptor into EV. EV will react to this call as
168if the readyness notifications specified by C<$revents> (a combination of
169C<EV::READ> and C<EV::WRITE>) happened on the file descriptor C<$fd>.
170
171=item EV::feed_signal_event ($signal)
172
173Feed a signal event into EV. EV will react to this call as if the signal
174specified by C<$signal> had occured.
175
165=back 176=back
177
166 178
167=head2 WATCHER OBJECTS 179=head2 WATCHER OBJECTS
168 180
169A watcher is an object that gets created to record your interest in some 181A watcher is an object that gets created to record your interest in some
170event. For instance, if you want to wait for STDIN to become readable, you 182event. For instance, if you want to wait for STDIN to become readable, you
253The default priority of any newly-created watcher is 0. 265The default priority of any newly-created watcher is 0.
254 266
255Note that the priority semantics have not yet been fleshed out and are 267Note that the priority semantics have not yet been fleshed out and are
256subject to almost certain change. 268subject to almost certain change.
257 269
258=item $w->trigger ($revents) 270=item $w->invoke ($revents)
259 271
260Call the callback *now* with the given event mask. 272Call the callback *now* with the given event mask.
273
274=item $w->feed_event ($revents)
275
276Feed some events on this watcher into EV. EV will react to this call as if
277the watcher had received the given C<$revents> mask.
278
279=item $revents = $w->clear_pending
280
281If the watcher is pending, this function returns clears its pending status
282and returns its C<$revents> bitset (as if its callback was invoked). If the
283watcher isn't pending it does nothing and returns C<0>.
261 284
262=item $previous_state = $w->keepalive ($bool) 285=item $previous_state = $w->keepalive ($bool)
263 286
264Normally, C<EV::loop> will return when there are no active watchers 287Normally, C<EV::loop> will return when there are no active watchers
265(which is a "deadlock" because no progress can be made anymore). This is 288(which is a "deadlock" because no progress can be made anymore). This is

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines