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

Re: [Libevent-users] questions about bufferevent callbacks in multithreaded code



On Wed, May 1, 2013 at 12:07 PM, Sashan Govender <sashang@xxxxxxxxx> wrote:
> Hi
>
> I need to clarify my understanding of how bufferevent objects work with
> mulithreaded code. If a bufferevent triggers a callback (read or write) does
> it hold a lock until that callback completes?

Ordinarily, yes. You can override this with the
BEV_OPT_UNLOCK_CALLBACKS option, as described in
http://www.wangafu.net/~nickm/libevent-book/Ref6_bufferevent.html

> Do the locks use a recursive
> mutex?

Yes.

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