Greetings!
I would like to modify/replace an existing library, pySerial, to use asyncio in Windows/Mac/Linux. I have a Windows implementation working by "listening for an event" like this:
read_future = loop._proactor.wait_for_handle(overlapped_read.hEvent)
Where overlapped_read is the OVERLAPPED structure (via ctypes or pywin32) and the event is setup previously, e.g. "received chars on the serial port" event here.
My question is in regards to the best practices for awaiting an OS event providing for the most efficient and maintainable implementation. Reference to other multi-platform libraries or builtins that accomplish similar would be appreciated.
Thanks for your time,
J.P. Hutchins