Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Is a libmodbus context really thread-safe? #246
I wonder whether this is really the case (any longer). In
I also wonder whether is is really necessary or important, that libmodbus is thread-safe? Modbus itself is a master-slave protocol, so there should be no parallelism. Maybe anybody could illustrate an usage scenario where multiple threads are involved?
added a commit
Jul 24, 2017
@bigzwey Interrupted by what? Libmodbus is a library and does not contain any shared-between-threads-data in its context(s). (If it does it would be a bug).
If you use libmodbus in your threaded code it is up to you to take care of the thread-safety by using mutexes when accessing shared-memory (for example the