[Libevent-users] Cross-event base interactions

2012-11-20 Thread Ralph Castain
Hi folks We have a case where we are running two parallel threads, each looping on their own event base (we have the libevent thread support enabled). Even though the two bases are running in separate threads, however, we see an impact on response time - i.e., if we run only one thread, events

Re: [Libevent-users] Beginners' question: multi-threaded HTTP service

2012-11-20 Thread Mark Ellzey
On Tue, Nov 20, 2012 at 09:45:17AM +0200, Nir Soffer wrote: > > On Nov 20, 2012, at 12:34 AM, Pander wrote: > > > > >only this works: > > > >char buf[1024]; > >int n; > >while ((n = evbuffer_remove(req->buffer_in, buf, sizeof(buf))) > 0) { > > fwrite(buf, 1, n, stdout); > >} > >printf("\n"); >

Re: [Libevent-users] Beginners' question: multi-threaded HTTP service

2012-11-20 Thread Mark Ellzey
On Tue, Nov 20, 2012 at 09:45:17AM +0200, Nir Soffer wrote: > > On Nov 20, 2012, at 12:34 AM, Pander wrote: > > > > >only this works: > > > >char buf[1024]; > >int n; > >while ((n = evbuffer_remove(req->buffer_in, buf, sizeof(buf))) > 0) { > > fwrite(buf, 1, n, stdout); > >} > >printf("\n"); >