--- libev/ev.pod 2011/01/17 12:11:12 1.360 +++ libev/ev.pod 2011/05/30 18:34:28 1.369 @@ -60,7 +60,7 @@ // now wait for events to arrive ev_run (loop, 0); - // unloop was called, so exit + // break was called, so exit return 0; } @@ -485,10 +485,10 @@ Use the linux-specific epoll(7) interface (for both pre- and post-2.6.9 kernels). -For few fds, this backend is a bit little slower than poll and select, -but it scales phenomenally better. While poll and select usually scale -like O(total_fds) where n is the total number of fds (or the highest fd), -epoll scales either O(1) or O(active_fds). +For few fds, this backend is a bit little slower than poll and select, but +it scales phenomenally better. While poll and select usually scale like +O(total_fds) where total_fds is the total number of fds (or the highest +fd), epoll scales either O(1) or O(active_fds). The epoll mechanism deserves honorable mention as the most misdesigned of the more advanced event mechanisms: mere annoyances include silently @@ -827,7 +827,9 @@ own C"). However, a pair of C/C watchers is usually a better approach for this kind of thing. -Here are the gory details of what C does: +Here are the gory details of what C does (this is for your +understanding, not a guarantee that things will work exactly like this in +future versions): - Increment loop depth. - Reset the ev_break status. @@ -870,7 +872,7 @@ ... queue jobs here, make sure they register event watchers as long ... as they still have work to do (even an idle watcher will do..) ev_run (my_loop, 0); - ... jobs done or somebody called unloop. yeah! + ... jobs done or somebody called break. yeah! =item ev_break (loop, how) @@ -1380,8 +1382,10 @@ initialised. This can be done with a call to C, or calls to C followed by the watcher-specific C function. -In this state it is simply some block of memory that is suitable for use -in an event loop. It can be moved around, freed, reused etc. at will. +In this state it is simply some block of memory that is suitable for +use in an event loop. It can be moved around, freed, reused etc. at +will - as long as you either keep the memory contents intact, or call +C again. =item started/running/active @@ -1419,8 +1423,9 @@ freeing it is often a good idea. While stopped (and not pending) the watcher is essentially in the -initialised state, that is it can be reused, moved, modified in any way -you wish. +initialised state, that is, it can be reused, moved, modified in any way +you wish (but when you trash the memory block, you need to C +it again). =back @@ -2150,9 +2155,12 @@ C will try to run the callback in this mode at the next possible time where C