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

Support for asynchronous serial communications #2

Open
teauxfu opened this issue Apr 19, 2021 · 0 comments
Open

Support for asynchronous serial communications #2

teauxfu opened this issue Apr 19, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@teauxfu
Copy link
Member

teauxfu commented Apr 19, 2021

This issue is for collecting information regarding implementing support for single-threaded asynchronous serial communications via pyserial-ascynio.

As it currently stands the IO delays are relatively small (30-50 ms for a single, successful write/read pair), and there seems to not be a great deal of benefit to doing this. I may implement it anyway, just for the sake of practice, but it's currently lowest-priority.

A combination of multithreading via concurrent.futures.ThreadPoolExecutor with queue.Queue has been sufficient for my own purposes when communicating with multiple pumps while also doing other things (running UI, logging to files, etc.).
If anyone encounters limitations with this approach or is aware of a neat alternative I would love to hear about it!

pySerial itself only has experimental support for use with threading.

Packages

  • pyserial-asyncio only has support for OSX, Linux, and BSD
    There seems to be experimental support for Windows
  • aioserial may be an option
    sounds like this just uses multithreading internally
  • asyncserial-py only supports Python 3.6 😞
    seems abandoned

Helpful links / resources / examples

@teauxfu teauxfu added the enhancement New feature or request label Apr 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant