You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A libmodbus 'context' is thread safe and may be shared among as many application
threads as necessary, without any additional locking required on the part of the
caller.
and the file NEWS states for libmodbus 3.1.3 (2016-05-11):
- A libmodbus context isn't thread safe and won't be (closes #246).
But what does that mean specifically? Is the whole library not thread safe? Can I call library functions from different threads as long as I ensure that each thread operates on its own libmodbus context? Can I run a libmodbus server and libmodbus clients in different threads, or are or are there limitations to consider?
Being said, I think the documentation should have a section about thread safety.
The text was updated successfully, but these errors were encountered:
On client side, yes, you can call library functions from different threads with one context by thread.
But if you write a Modbus server, the library doesn't help you to protect the mapping data (write access).
I miss some statement on thread safety in the documentation.
The commit 23313e8 removed the following text:
and the file NEWS states for libmodbus 3.1.3 (2016-05-11):
But what does that mean specifically? Is the whole library not thread safe? Can I call library functions from different threads as long as I ensure that each thread operates on its own libmodbus context? Can I run a libmodbus server and libmodbus clients in different threads, or are or are there limitations to consider?
Being said, I think the documentation should have a section about thread safety.
The text was updated successfully, but these errors were encountered: