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

Add Channel#sendClose #3279

Closed
armanbilge opened this issue Aug 22, 2023 · 1 comment · Fixed by #3280
Closed

Add Channel#sendClose #3279

armanbilge opened this issue Aug 22, 2023 · 1 comment · Fixed by #3280
Assignees
Labels

Comments

@armanbilge
Copy link
Member

And also maybe Channel#trySendClose. Naming subject to bikeshed e.g. sendAndClose?

The idea is to be able to atomically send a final element to the Channel and immediately close it. With ch.send(...) *> ch.close there is a possibility that another concurrent send can sneak between.

Motivation: in http4s/http4s#7196 we want to close the Channel immediately upon sending a WebSocket CloseFrame.

@tothpeti has kindly volunteered to work on this :)

@tothpeti
Copy link
Contributor

I would like to work on this one :)

tothpeti added a commit to tothpeti/fs2 that referenced this issue Aug 22, 2023
tothpeti added a commit to tothpeti/fs2 that referenced this issue Aug 22, 2023
tothpeti added a commit to tothpeti/fs2 that referenced this issue Aug 24, 2023
tothpeti added a commit to tothpeti/fs2 that referenced this issue Aug 24, 2023
tothpeti added a commit to tothpeti/fs2 that referenced this issue Aug 24, 2023
tothpeti added a commit to tothpeti/fs2 that referenced this issue Aug 24, 2023
tothpeti added a commit to tothpeti/fs2 that referenced this issue Sep 3, 2023
@armanbilge armanbilge linked a pull request Sep 11, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants