ljean/modbus-tk

The global lock can be replaced by `self.lock` in `Master.execute`

sazima opened this issue · 0 comments

@threadsafe_function

In my project, I need to read more than a dozen PLCs and each Plc needs to read 60 address. When I read one PLC, it is not necessary for the other Plc to wait for lock.

In my test:
When use @threadsafe_function call execute cost more than 20 seconds every time . Use with self.lock: takes only cost less than 1 seconds