--- libev/ev.pod 2008/12/07 15:43:43 1.222 +++ libev/ev.pod 2009/02/25 06:32:57 1.225 @@ -462,8 +462,8 @@ everywhere, so you might need to test for this. And since it is broken almost everywhere, you should only use it when you have a lot of sockets (for which it usually works), by embedding it into another event loop -(e.g. C or C) and, did I mention it, -using it only for sockets. +(e.g. C or C (but C is of course +also broken on OS X)) and, did I mention it, using it only for sockets. This backend maps C into an C kevent with C, and C into an C kevent with @@ -1621,7 +1621,7 @@ =item ev_periodic_init (ev_periodic *, callback, ev_tstamp at, ev_tstamp interval, reschedule_cb) -=item ev_periodic_set (ev_periodic *, ev_tstamp after, ev_tstamp repeat, reschedule_cb) +=item ev_periodic_set (ev_periodic *, ev_tstamp at, ev_tstamp interval, reschedule_cb) Lots of arguments, lets sort it out... There are basically three modes of operation, and we will explain them from simplest to most complex: @@ -1673,7 +1673,7 @@ current time as second argument. NOTE: I. +ever, or make ANY other event loop modifications whatsoever>. If you need to stop it, return C (or so, fudge fudge) and stop it afterwards (e.g. by starting an C watcher, which is the @@ -2430,24 +2430,20 @@ this case you would put all the high priority stuff in one loop and all the rest in a second one, and embed the second one in the first. -As long as the watcher is active, the callback will be invoked every time -there might be events pending in the embedded loop. The callback must then -call C to make a single sweep and invoke -their callbacks (you could also start an idle watcher to give the embedded -loop strictly lower priority for example). You can also set the callback -to C<0>, in which case the embed watcher will automatically execute the -embedded loop sweep. - -As long as the watcher is started it will automatically handle events. The -callback will be invoked whenever some events have been handled. You can -set the callback to C<0> to avoid having to specify one if you are not -interested in that. - -Also, there have not currently been made special provisions for forking: -when you fork, you not only have to call C on both loops, -but you will also have to stop and restart any C watchers -yourself - but you can use a fork watcher to handle this automatically, -and future versions of libev might do just that. +As long as the watcher is active, the callback will be invoked every +time there might be events pending in the embedded loop. The callback +must then call C to make a single +sweep and invoke their callbacks (the callback doesn't need to invoke the +C function directly, it could also start an idle watcher +to give the embedded loop strictly lower priority for example). + +You can also set the callback to C<0>, in which case the embed watcher +will automatically execute the embedded loop sweep whenever necessary. + +Fork detection will be handled transparently while the C watcher +is active, i.e., the embedded loop will automatically be forked when the +embedding loop forks. In other cases, the user is responsible for calling +C on the embedded loop. Unfortunately, not all backends are embeddable: only the ones returned by C are, which, unfortunately, does not include any @@ -3235,11 +3231,13 @@ =item EV_USE_REALTIME If defined to be C<1>, libev will try to detect the availability of the -real-time clock option at compile time (and assume its availability at -runtime if successful). Otherwise no use of the real-time clock option will -be attempted. This effectively replaces C by C and will not normally affect correctness. See the -note about libraries in the description of C, though. +real-time clock option at compile time (and assume its availability +at runtime if successful). Otherwise no use of the real-time clock +option will be attempted. This effectively replaces C +by C and will not normally affect +correctness. See the note about libraries in the description of +C, though. Defaults to the opposite value of +C. =item EV_USE_CLOCK_SYSCALL