Skip to content

Conversation

armanbilge
Copy link
Member

)
}
)
.as(Some(Async[F].delay(sch.close())))
Copy link
Member Author

@armanbilge armanbilge Nov 22, 2022

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?

Copy link
Member

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

@armanbilge armanbilge changed the title Fix async_ uses for new uncancelable semantic Fix async_ usages for new uncancelable semantic Nov 22, 2022
@djspiewak
Copy link
Member

I can take care of the faraday cage here in a bit.

@djspiewak
Copy link
Member

Actually I can't because I don't have publish rights to co.fs2. Someone else has to.

@armanbilge
Copy link
Member Author

armanbilge commented Nov 22, 2022

I'm actually doing it right now :) update: 3.5-1c0be5c is propagating.

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.

4 participants