Re: [Libevent-users] RFC: strategy for deadlock avoidance and safe finalization in Libevent 2.1

2013-04-10 Thread Alexander Drozdov
The idea is good, but why to not just register finalizer callback on event initialization? A data pointer is passed to event_assign() or event_new() so we can pass finalizer along with the data. With this approach, - finalizer, if set, will be called automatically after calling event_free() or

Re: [Libevent-users] RFC: strategy for deadlock avoidance and safe finalization in Libevent 2.1

2013-04-10 Thread Nick Mathewson
On Wed, Apr 10, 2013 at 3:51 AM, Alexander Drozdov wrote: > The idea is good, but why to not just register finalizer callback on > event initialization? A data pointer is passed to event_assign() or > event_new() > so we can pass finalizer along with the data. Hi, Alexander! Thanks for the feedba

[Libevent-users] evbuffer_find versus evbuffer_search

2013-04-10 Thread Sashan Govender
Hi I'm porting some code from libevent 1.4 to 2.0 and in the 1.4 version some of the code is using evbuffer_find find a pointer to the start of a sequence then calculating a pointer difference from it: u_char* end = evbuffer_find(input, pattern, 2); ... ptrdiff_t len = end - input->buffe

Re: [Libevent-users] evbuffer_find versus evbuffer_search

2013-04-10 Thread Nick Mathewson
On Wed, Apr 10, 2013 at 11:12 PM, Sashan Govender wrote: > Hi > > I'm porting some code from libevent 1.4 to 2.0 and in the 1.4 version some > of the code is using evbuffer_find find a pointer to the start of a sequence > then calculating a pointer difference from it: > > u_char* end = evbuffe