Re: [Libevent-users] How to avoid calling bufferevent_write on a freed bev efficiently?

2012-02-09 Thread Wenliang Zhang
Hi, Nick, Thanks for your reply. It's very helpful. Thanks and Regards, Wenliang On Thu, Feb 9, 2012 at 12:12 AM, Nick Mathewson wrote: > On Wed, Feb 8, 2012 at 5:37 AM, Wenliang Zhang wrote: > > Hi, all, > > Personally, my first approach would be to do it with som

[Libevent-users] How to avoid calling bufferevent_write on a freed bev efficiently?

2012-02-08 Thread Wenliang Zhang
Hi, all, I'm using libevent for my project. But I can't find an easy way to make sure a bufferevent structure is still legal when I want to call bufferevent_write to send some info back to client. In my project, the event_base_dispatch() runs in main thread, and when it receiv