diff options
-rw-r--r-- | Changes | 1 | ||||
-rw-r--r-- | ev.c | 16 | ||||
-rw-r--r-- | ev.pod | 8 |
3 files changed, 20 insertions, 5 deletions
@@ -5,7 +5,6 @@ TODO: EV_STANDALONE == NO_HASSEL (do not use clock_gettime in ev_standalone) TODO: document WSA_EV_USE_SOCKET in win32 part TODO: ^ OR use WSASend/WSARecv on the handle, which always works -TODO: assert on fd watcher linked list pointing to itself TODO: faq, process a thing in each iteration - queueing pending watchers of higher priority from a watcher now invokes them in a timely fashion (reported by Denis Bilenko). @@ -2556,8 +2556,8 @@ void ecb_cold ev_verify (EV_P) EV_THROW { #if EV_VERIFY - int i; - WL w; + int i, j; + WL w, w2; assert (activecnt >= -1); @@ -2566,10 +2566,15 @@ ev_verify (EV_P) EV_THROW assert (("libev: negative fd in fdchanges", fdchanges [i] >= 0)); assert (anfdmax >= 0); - for (i = 0; i < anfdmax; ++i) - for (w = anfds [i].head; w; w = w->next) + for (i = j = 0; i < anfdmax; ++i) + for (w = w2 = anfds [i].head; w; w = w->next) { verify_watcher (EV_A_ (W)w); + + if (++j & 1) + w2 = w2->next; + + assert (("libev: io watcher list contains a loop", w != w2)); assert (("libev: inactive fd watcher on anfd list", ev_active (w) == 1)); assert (("libev: fd mismatch between watcher and anfd", ((ev_io *)w)->fd == i)); } @@ -3252,6 +3257,9 @@ ev_io_start (EV_P_ ev_io *w) EV_THROW array_needsize (ANFD, anfds, anfdmax, fd + 1, array_init_zero); wlist_add (&anfds[fd].head, (WL)w); + /* common bug, apparently */ + assert (("libev: ev_io_start called with corrupted watcher", ((WL)w)->next != (WL)w)); + fd_change (EV_A_ fd, w->events & EV__IOFDSET | EV_ANFD_REIFY); w->events &= ~EV__IOFDSET; @@ -4240,6 +4240,14 @@ Brian Maher has written a partial interface to libev for lua (at the time of this writing, only C<ev_io> and C<ev_timer>), to be found at L<http://github.com/brimworks/lua-ev>. +=item Javascript + +Node.js (L<http://nodejs.org>) uses libev as the underlying event library. + +=item Others + +There are others, and I stopped counting. + =back |