Skip to content

Support for asynchronous serial communications #2

Open
@teauxfu

Description

@teauxfu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions