[Libevent-users] Is there any tutorial about the defer callbacks in libevent?

2011-04-11 Thread Fu Jiantao
Thanks in advance!

Re: [Libevent-users] infinite loop in evmap_io_active

2011-04-11 Thread Mike Cui
> "One reason that can happen > is if you add an event, then re-assign it and re-add it without first > deleting it.  To debug that, try enabling debug mode by calling >    event_enable_debug_mode(); > near the start of your program (before you construct any event_bases). > > It should detect any a

Re: [Libevent-users] infinite loop in evmap_io_active

2011-04-11 Thread Nick Mathewson
On Mon, Apr 11, 2011 at 6:34 AM, Mike Cui wrote: > I'm also seeing an infinite loop in evmap_io_active: > >        TAILQ_FOREACH(ev, &ctx->events, ev_io_next) { >                if (ev->ev_events & events) >                        event_active_nolock(ev, ev->ev_events & events, 1); >        } > >

Re: [Libevent-users] Deadlock driving me nuts

2011-04-11 Thread Nick Mathewson
On Sun, Apr 10, 2011 at 2:55 PM, Sherif Fanous wrote: > I'm willing to post code snippets if it helps. > What I'm seeing is that after some time adding just 1 event causes an > infinite loop in evmap_io_active, and I can't figure out if I'm doing > anything wrong, and why the code would work for s

[Libevent-users] Off by one error in HTTP message handling or documentation error

2011-04-11 Thread Oscar Koeroo
Hello, I'm using libevent-2.0.10-stable and have a problem in my libevent based HTTP client (and service). I'm using the following construction (pseudo-codish): evbuffer_add( evhttp_request_get_output_buffer( evhttp_request_new(polling_callback, NULL) ), strin

[Libevent-users] infinite loop in evmap_io_active

2011-04-11 Thread Mike Cui
I'm also seeing an infinite loop in evmap_io_active: TAILQ_FOREACH(ev, &ctx->events, ev_io_next) { if (ev->ev_events & events) event_active_nolock(ev, ev->ev_events & events, 1); } It looks like the ev_io_next pointer points back to itself :