Re: [Libevent-users] infinite loop in evmap_io_active

2011-04-12 Thread Mike Cui
> I've drawn up a draft state transition diagram.  It's not pretty, but > it might help: >   http://www.wangafu.net/~nickm/volatile/event_states.png > Please let me know if I've got anything wrong; I want to include it in > the book if I can figure out how.  That URL isn't permanent. > > Did this a

Re: [Libevent-users] infinite loop in evmap_io_active

2011-04-12 Thread Nick Mathewson
On Mon, Apr 11, 2011 at 3:16 PM, Mike Cui wrote: >> "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

Re: [Libevent-users] Deadlock driving me nuts

2011-04-12 Thread Sherif Fanous
Hi Nick Well my problems are gone, but only because I changed the design. Initially I was using a very inefficient method, whereby I would create a non persistent event every time I wanted to write some data to a socket (event_new followed by event_add). In the callback, if all the data was sent