Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Statment on thread safety missing in the documentation #718

Open
franzhollerer opened this issue Oct 19, 2023 · 0 comments
Open

Statment on thread safety missing in the documentation #718

franzhollerer opened this issue Oct 19, 2023 · 0 comments

Comments

@franzhollerer
Copy link

I miss some statement on thread safety in the documentation.

The commit 23313e8 removed the following text:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant