From a7d1fb9edba852f0dd014fdea85074d61d8a6d69 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 16 Mar 2010 17:11:48 +0000 Subject: *** empty log message *** --- ev.pod | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) (limited to 'ev.pod') diff --git a/ev.pod b/ev.pod index 584ffed..33c58f4 100644 --- a/ev.pod +++ b/ev.pod @@ -1034,7 +1034,7 @@ are: The file descriptor in the C watcher has become readable and/or writable. -=item C +=item C The C watcher has timed out. @@ -1766,7 +1766,7 @@ callback, which will "do the right thing" and start the timer: ev_init (timer, callback); last_activity = ev_now (loop); - callback (loop, timer, EV_TIMEOUT); + callback (loop, timer, EV_TIMER); And when there is some activity, simply store the current time in C, no libev calls at all: @@ -3181,9 +3181,9 @@ If C is less than 0, then no timeout watcher will be started. Otherwise an C watcher with after = C (and repeat = 0) will be started. C<0> is a valid timeout. -The callback has the type C and gets +The callback has the type C and is passed an C set like normal event callbacks (a combination of -C, C, C or C) and the C +C, C, C or C) and the C value passed to C. Note that it is possible to receive I a timeout and an io event at the same time - you probably should give io events precedence. @@ -3194,7 +3194,7 @@ Example: wait up to ten seconds for data to appear on STDIN_FILENO. { if (revents & EV_READ) /* stdin might have data for us, joy! */; - else if (revents & EV_TIMEOUT) + else if (revents & EV_TIMER) /* doh, nothing entered */; } @@ -4623,6 +4623,30 @@ involves iterating over all running async watchers or all signal numbers. =back +=head1 PORTING FROM 3.X TO 4.X + +The major version 4 introduced some minor incompatible changes to the API. + +=over 4 + +=item C replaced by C in C + +This is a simple rename - all other watcher types use their name +as revents flag, and now C does, too. + +Both C and C symbols were present in 3.x versions +and continue to be present for the forseeable future, so this is mostly a +documentation change. + +=item C mechanism replaced by C + +The preprocessor symbol C has been replaced by a different +mechanism, C. Programs using C usually compile +and work, but the library code will of course be larger. + +=back + + =head1 GLOSSARY =over 4 @@ -4653,7 +4677,7 @@ for reading on a file descriptor, time having passed or simply not having any other events happening anymore. In libev, events are represented as single bits (such as C or -C). +C). =item event library -- cgit v1.2.3