libnetconf icon indicating copy to clipboard operation
libnetconf copied to clipboard

is libnetconf threadsafe?

Open krishnakumar4a4 opened this issue 9 years ago • 4 comments

Hi, We have started 10netopeer instances with a single libnetconf library. We want to change this behavior such that one netopeer instance supports all the 10connections and work differently on different datastores. So I would like to check whether libnetconf is threadsafe for such an implementation? I am using libnetconf-0.9.x

Regards, Krishna kumar.

krishnakumar4a4 avatar Jan 08 '16 11:01 krishnakumar4a4

Hi Krishna, libnetconf-0.9.x nor 0.10.0 are not thread-safe, generally speaking. Some use-cases may work, but they are not documented anywhere. Recent libnetconf 0.10.0 commits improved its thread-safety a bit, so you may want to use that one. Nevertheless, we are planning for libnetconf2 to be thread-safe or at least to be documented with details on what is thread-safe and what is not, bit its public release will not be ready for some time.

Regards, Michal

michalvasko avatar Jan 08 '16 12:01 michalvasko

Hi Michal, Thank you very much for your answer, I would like to check its limits now. I will let you know with any useful results in this direction.

krishnakumar4a4 avatar Jan 08 '16 19:01 krishnakumar4a4

Hi, I still have a question about thread-safety:

Is is safe if I create a few threads and these threads do not interact with each other (a session created in each thread, and it does not know what other threads are doing) ?

windy32 avatar Jun 08 '16 08:06 windy32

yes, such a use case should be thread-safe

rkrejci avatar Jun 08 '16 11:06 rkrejci