Skip to content

Conversation

carstenandrich
Copy link

The current read timeout behavior implemented by serial-windows differs significantly from the read timeouts of serial-unix. On Windows, read calls do not return immediately when bytes are/become available, but instead wait for the timeout to expire. In contrast, on Linux (tested, but should be true for all POSIX systems) read calls return as soon as bytes are available. Particularly for interactive implementations, the Windows behavior is suboptimal.

This pull request implements the POSIX-behavior on Windows by setting up COMMTIMEOUTS accordingly (see Windows API documentation).

@dcuddeback
Copy link
Owner

@carstenandrich Thanks. The Windows implementation is intended to behave the same as the POSIX implementation. I'll need to find some time to setup a Windows VM to reproduce and verify the fix. If everything checks out, I can merge this.

@RisinT96
Copy link

Any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants