Re: [Libevent-users] Crash in my simple multi-threaded evhttp app [code incl.]

2012-07-27 Thread Julian Bui
For anyone following this thread and interested in what I ended up doing: I found POCO which has a nice networking library that uses the select mechanism and has a multi-thread HTTP server library. It seems to be working well so far. On Wed, Jun 27, 2012 at 9:38 PM, Julian Bui wrote: > Tha

Re: [Libevent-users] Crash in my simple multi-threaded evhttp app [code incl.]

2012-06-27 Thread Julian Bui
7 PM, Nick Mathewson wrote: > On Wed, Jun 27, 2012 at 2:02 PM, Julian Bui wrote: > > > QUESTIONS: > > -was evhttp meant to be used this way? Should I not be calling > > evhttp_send_reply/error from a different thread? I have set > > up evthread_lock_callbacks, so I would th

Re: [Libevent-users] Crash in my simple multi-threaded evhttp app [code incl.]

2012-06-27 Thread Julian Bui
Wed, Jun 27, 2012 at 1:11 PM, Julian Bui wrote: > Thanks for your reply, Mark. > > First of all, I'd like to clarify, if maybe I did not make it clear, but > I'm using a custom threading library built on top of Qt. So I'm not quite > sure if I use evthread_use_win

Re: [Libevent-users] Crash in my simple multi-threaded evhttp app [code incl.]

2012-06-27 Thread Julian Bui
Lock::alloc; lock_cbs.free = &EvLock::free; lock_cbs.lock = &EvLock::lock; lock_cbs.unlock = &EvLock::unlock; evthread_set_lock_callbacks(&lock_cbs); On Wed, Jun 27, 2012 at 12:42 PM, Mark Ellzey wrote: > On Wed, Jun 27, 2012 at 02:37:22PM -0500,

[Libevent-users] Crash in my simple multi-threaded evhttp app [code incl.]

2012-06-27 Thread Julian Bui
Hi libevent, Sorry for the recent surge of emails. I am trying to determine the cause of a problem in my application while using evhttp. I wrote a toy/dummy server (whose code I included) that exhibits the same problem that my real application is having. PROBLEM OVERVIEW: My application is usi

[Libevent-users] libevent custom thread library: Recursive mutexes and wait conditions

2012-06-25 Thread Julian Bui
Hello libevent, I am writing to see if I could get clarification on wait conditions and their use with recursive locks. My first issue is understanding how a custom evthread_lock is supposed to be implemented. evthread_lock_callbacks::supported_locktypes() documentations says "Note that RECURSIV

[Libevent-users] Re: responses delayed while using evhttp

2012-06-20 Thread Julian Bui
the underlying thread architecture works, if anybody has time to explain. And why there would be a 10s delay. On Wed, Jun 20, 2012 at 9:09 AM, Julian Bui wrote: > Hi all, > > I am having trouble sending HTTP replies/responses in a timely manner > using evhttp. > > PR

[Libevent-users] responses delayed while using evhttp

2012-06-20 Thread Julian Bui
Hi all, I am having trouble sending HTTP replies/responses in a timely manner using evhttp. PROBLEM: If I call evhttp_send_reply in the gencb (callback that handles all requests), then my requests are sent out in a timely manner and everything is fine. However, I do some processing that will tak

Re: [Libevent-users] event_base_dispatch returning -1 - help debugging

2012-06-12 Thread Julian Bui
ered on incoming connection. I'll work on getting a more basic piece of code that I can put on the internet. I just difficult to release a complete piece of code with this being a commercial product. On Tue, Jun 12, 2012 at 12:09 PM, Dave Hart wrote: > On Tue, Jun 12, 2012 at 5:06 PM, Julian

Re: [Libevent-users] event_base_dispatch returning -1 - help debugging

2012-06-12 Thread Julian Bui
;event is still pending" << endl; } else { cout << "event is still pending" << endl; } On Tue, Jun 12, 2012 at 9:47 AM, Julian Bui wrote: > Thanks for the quick response, Nick. > > > Step one might be to

Re: [Libevent-users] event_base_dispatch returning -1 - help debugging

2012-06-12 Thread Julian Bui
general strategy/structure/architecture of a program if I am to use both libevent and select()? Is there any example code that shows this interaction? Please let me know. Thanks for all your help -Julian On Fri, Jun 8, 2012 at 1:10 PM, Nick Mathewson wrote: > On Thu, Jun 7, 2012 at 4:59 PM, Julia

[Libevent-users] event_base_dispatch returning -1 - help debugging

2012-06-07 Thread Julian Bui
Hi everyone, I am having trouble with my libevent 2.0.18 server. The dispatch loop keeps returning -1 and I cannot determine the cause. I have not tried searching the mailing list as there does not seem to be a search option (http://archives.seul.org/libevent/users/) PROBLEM: My server works mo