-
Notifications
You must be signed in to change notification settings - Fork 603
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
Fix async_
usages for new uncancelable semantic
#3063
Conversation
} | ||
) | ||
.as(Some(Async[F].delay(sch.close()))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's potentially some weird life-cycle stuff going on here: AFAIK the only way to cancel an on-going accept
is to close the server socket. As the signature is roughly Resource[F, Stream[F, Socket]]
, where the server socket is tied to the outer resource, in theory you might expect to be able to cancel the inner stream and then start it again.
One way to fix this is to introduce a Channel.synchronous
as an intermediary: that way, the stream can be canceled gracefully, without forcing to kill the server socket.
Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's some related history here: #2300
async_
uses for new uncancelable semanticasync_
usages for new uncancelable semantic
I can take care of the faraday cage here in a bit. |
Actually I can't because I don't have publish rights to |
I'm actually doing it right now :) update: |
Canaries typelevel/cats-effect#3205.