[Libevent-users] bug: handler called again after event_del()
Springande Ulv
springandeulv at gmail.com
Mon Feb 11 13:10:29 EST 2008
I'm using libevent-1.4.1-beta on Mac OS X Leopard. Libevent is using
kqueue.
I find that libevent call my event handler several times when it
should only call the handler once. This is the case if I register for
a one shoot event notification as shown below or if I use EV_READ|
EV_PERSIST and explicit remove the event using event_del(event)
event_set(event, fd, EV_READ, handler, arg);
event_base_set(eventbase, event)
event_priority_set(event, priority)
event_add(event, timeout)
In both cases I see spurious calls to the event handler which should
not occur.
Has anyone else seen this problem on Mac OS X? Otherwise I'll try to
debug more and come up with more specifics.
Also I also see that libevent seems to enter a while-true loop, grab
all CPU and freeze during handling of a write|timeout. I have a
feeling this is related to the spurious kevent notification mentioned
above. Has anyone seen this as well?
More information about the Libevent-users
mailing list