[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] Deadlock when calling bufferevent_free from an other thread



One solution that comes to mind is to add a (for example)
event_del_nowait(), or event_del_nonblocking() which requires the
event in question be allocated dynamically via libevent, and therefore
can safely use the dead list approach of queuing the deallocation to
be done by the thread running the event base's loop.  It's ugly to
require clients to understand the deadlock risk of calling event_del()
from a thread other than the one servicing the event base loop, but it
provides the functionality needed for both scenarios.

Cheers,
Dave Hart
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.