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

Re: [Libevent-users] Crash in event_del



On Wed, Aug 11, 2010 at 12:22 PM, William Ahern
<william@xxxxxxxxxxxxxxxxxx> 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 compiling without NDEBUG, one might be willing
to pay the overhead of checking whether event_init had been called
on entry to every function... but having the program crash also seems
like a fine clue :-)
- Dan
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.