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

Refactor win32 System::FileDescriptor#unbuffered_{read,write} #14607

Conversation

straight-shoota
Copy link
Member

Extracts blocking read and write implementations into separate methods, #read_blocking and #write_blocking to harmonize the level of abstraction in #unbuffered_read/#unbuffered_write.

I'm not touching the buffered branch because it's going to be a single call after the event loop refactor.

@straight-shoota straight-shoota self-assigned this May 22, 2024
@straight-shoota straight-shoota changed the title Refactor win32 System::FileDescriptor#unbuffered_read Refactor win32 System::FileDescriptor#unbuffered_{read,write} May 22, 2024
Copy link
Contributor

@Sija Sija left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per the PR description, it's also symmetrical to read_blocking.

src/crystal/system/win32/file_descriptor.cr Outdated Show resolved Hide resolved
src/crystal/system/win32/file_descriptor.cr Outdated Show resolved Hide resolved
Co-authored-by: Sijawusz Pur Rahnama <sija@sija.pl>
@straight-shoota straight-shoota added this to the 1.13.0 milestone May 23, 2024
@straight-shoota straight-shoota merged commit eb2e70f into crystal-lang:master May 24, 2024
61 checks passed
@straight-shoota straight-shoota deleted the refactor/win32-file_descriptor-read-write branch May 24, 2024 10:37
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.

None yet

3 participants