[Libevent-users] Two event base in multi threaded application vs one event base?

2012-09-07 Thread Parvez Shaikh
Hi experts, While setting socket FD in event loop, should FD be set non-blocking (using fcntl)? Further I am confused about how to use libevent and would really appreciate some technical inputs on below. I am in a process of designing multi-threaded application and would like a main thread - a

Re: [Libevent-users] EV_WRITE - Wait for a socket or FD to become writeable.

2012-09-03 Thread Parvez Shaikh
IN for many messages leading to wasted event activation (rare but possible?). Thanks, Parvez On Mon, Sep 3, 2012 at 7:03 PM, Nir Soffer wrote: > On Mon, Sep 3, 2012 at 1:05 PM, Parvez Shaikh wrote: > >> Thanks Oleg and Nir. >> >> I am also pursuing another approach. Here

Re: [Libevent-users] EV_WRITE - Wait for a socket or FD to become writeable.

2012-09-03 Thread Parvez Shaikh
nt reactor thread (one with dispatch) calls a function that sends message from this list one by one until "send" encounters EAGAIN. Requesting your feedback on this approach. Thanks On Sun, Sep 2, 2012 at 3:45 PM, Nir Soffer wrote: > > > On Sun, Sep 2, 2012 at 6:54 AM, Par

Re: [Libevent-users] EV_WRITE - Wait for a socket or FD to become writeable.

2012-09-01 Thread Parvez Shaikh
if (send(queue.front())== EAGAIN); > return; > queue.pop(); > } > disable(EV_WRITE); > } > > 31.08.2012, в 8:50, Parvez Shaikh написал(а): > > > Hi all, > > > > I have a question about EV_WRITE event as

[Libevent-users] EV_WRITE - Wait for a socket or FD to become writeable.

2012-08-30 Thread Parvez Shaikh
Hi all, I have a question about EV_WRITE event as to when does it's callback function invoked? Is it that when someone first executes write on an fd associated with EV_WRITE event? Or when libevent detects that application can now write to fd without getting errors? For EV_READ it is easy to un