[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] Bufferevent threadsafe opt questions.



> Significant reason: there's a third operation you aren't considering

> here: the event_base is activating the events that implement your
> bufferevent in the thread where you're running event_base_loop().  It
> can only possibly be running in one of the two threads you mention (or
> in a third thread entirely).  It will both add data to the read
> buffer, and drain data from the write buffer, so it will necessarily
> race with one (if not both) of the operations you mentioned.

Yep, I realized this after a bit of gdbing, thanks for the explanation
anyhow! :).

Thanks!



      

***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.