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

Make Crystal::IOCP::OverlappedOperation abstract #14987

Conversation

HertzDevil
Copy link
Contributor

This allows different overlapped operations to provide their own closure data, instead of putting everything in one big class, such as in #14979 (comment).

Copy link
Member

@straight-shoota straight-shoota left a comment

Choose a reason for hiding this comment

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

This looks like a good idea 👍

The duplication of #try_cancel is a bit unfortunate, because the code structure is pretty similar (also similar for DNS from #14979). Maybe we could find a way to abstract this in a meaningful way, but it's fine. It's mostly boilerplate anyway.

I suppose #try_cancel should be declared as an abstract def in OverlappedOperation though.

@straight-shoota straight-shoota added this to the 1.14.0 milestone Sep 7, 2024
@straight-shoota straight-shoota merged commit 849e0d7 into crystal-lang:master Sep 9, 2024
59 of 65 checks passed
@HertzDevil HertzDevil deleted the refactor/overlapped-operation-abstract branch September 10, 2024 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants