AdvancedClimateSystems / uModbus

Python implementation of the Modbus protocol.
Mozilla Public License 2.0
211 stars 82 forks source link

Async tcp server #68

Closed bradder555 closed 5 years ago

bradder555 commented 5 years ago

a blocking server is handy if there is a background thread mutating memory, or if we are only interested in mutating this memory through modbus

to expand the functionality a little bit, an async option has been added, this fires up the server on a background thread freeing up the forground (or alternative thread) to modify the block of memory.

this is nice, because the application can now be used to simulate a plc or rio in one process

currently this pattern only works with the TcpSocket server, it would be nice to expand this further to provide the same interface for the serial class

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.06%) to 96.362% when pulling e8fdae8aa3825d1d3dd5527d93d6a77bcab1af79 on bradder555:async_tcp_server into 0560a42308003f4072d988f28042b8d55b694ad4 on AdvancedClimateSystems:master.

bradder555 commented 5 years ago

words have meaning outside of pythonland: https://stackoverflow.com/questions/748175/asynchronous-vs-synchronous-execution-what-does-it-really-mean

I can appreciate how the use of async can be confusing