attached there is a patch for the win32 path of serial.cpp
As I already mention Serial::isPending does not wait
until timeout but returns immediately.
To avoid this and have a defined timeout there is a
need for "overlapped" io.
I changed the affected functions: open, aRead, aWrite,
I tested with serialecho from demo I could remove that
"sleep(500)" with no CPU-load.
I mentioned that aRead and aWrite are always called
with Length=1. As I create in this function the
OVERLAPPED structure, then initialize ... .
First we can check why is aWrite not called by a chunk
And I think it is better to have 3 separate OVERLAPPED
members for read, write, wait. They can be initialized