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

[Libevent-users] Bufferevent threadsafe opt questions.



Hello again,

I have some questions related to BEV_OPT_THREADSAFE, specifically.. when exactly is the option's use required?
If I have an application that has two threads, one that writes to the output buffer only, and another that reads from the input buffer only, with at max one thread at a time reading from those two buffers (i.e, 2 threads maximum at a time, but always on opposite buffers), do I still need locks?
What if I was to read some data, disable the bufferevent, and then re-enable it later from another thread that would add some data to it (or something), (i.e, maximum one thread at a time here, but multiple threads over time), is that safe?

Essentially, my question is, what is safe, what isn't, when should they be used? I'm hoping my questions will help other people interested in the same thing too!

Thank you!



      

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