The scenario –
Thread B tries to delete an event E for which a callback is executed by thread
A. The callback calls event_base_gettimeofday_cached() that acquires
th_base_lock:
Thread A (LWP 14625 in the stack/strace below) locks *current_event_lock*
before invokoing callback.
Thread B (LWP
On Wed, Aug 11, 2010 at 1:21 AM, Gilad Benjamini
wrote:
> Nick,
> Thanks for the answer and the detailed document.
> Out of the different open source projects out there using libevent, which
> ones have already moved to 2.0 ?
Tor supports some but not all of the new 2.0 stuff, and will move to
us
On Wed, Aug 11, 2010 at 12:22 PM, William Ahern
wrote:
>> This code sample does skip the mandatory event_init, but event_del should be
>> more cautious nevertheless.
>
> Why? You'd rather the code do an admittedly needless check millions,
> possibly billions of times per process?
I suppose when c
On Wed, Aug 11, 2010 at 12:00:09PM -0700, Gilad Benjamini wrote:
> My code currently runs with libevent 1.4
> While in the process of upgrading to libevent 2.0.6 I got a segfault.
>
> Code sample is pretty basic
> event_set(&ev,fd,EV_READ,fd_handler,NULL) ;
> event_del(&ev) ;
>
> The reason f
On Tue, Aug 10, 2010 at 04:27:47PM -0700, Gilad Benjamini wrote:
>
> What are the major benefits of 2.0 ?
>From my point of view, a lot of convenience code was added which many
large programs already written to the libevent 1.4 APIs would already
have, some APIs were cleaned up, and the library w
My code currently runs with libevent 1.4
While in the process of upgrading to libevent 2.0.6 I got a segfault.
Code sample is pretty basic
event_set(&ev,fd,EV_READ,fd_handler,NULL) ;
event_del(&ev) ;
The reason for the crash is pretty simple as well. event_del calls
EVBASE_ACQUIRE_LOCK which