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

Feature/drain support #159

Merged
merged 3 commits into from
Aug 9, 2023
Merged

Conversation

AndreRenaud
Copy link
Contributor

This is a rebased version of #83, with a couple of changes to fix up the build.

polomsky and others added 3 commits June 16, 2023 09:14
Tested on Mac OS, Linux and Windows with UART emulated on USB.

I wrote general BSD code, because it should work, but I am not able to test
it.

On Mac OS I am quite sure that drain behaves as expected because it fixed
an issue with buffer overflow (which OS does not report but fails).

For Windows it seems that drain is actually part of `Write`, because
`Write` was long and `Drain` was fast. But I have not found any mention in
Win32 docs about buffering and asynchronous write, so I put there flushing
code to be sure, and this code did not break anything.

For Linux `Drain` is also taking more time than writing so it looks working
too.
@cmaglie cmaglie force-pushed the feature/drain-support branch from 0146e3f to cce2170 Compare August 9, 2023 16:29
@cmaglie cmaglie merged commit a2c15aa into bugst:master Aug 9, 2023
@cmaglie
Copy link
Member

cmaglie commented Aug 9, 2023

Thanks for the patch!

I've cherrypicked the commit from @polomsky and rebased yours on top of it.

@cmaglie cmaglie mentioned this pull request Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants