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

Implement receiveOrClosed #762

Closed
wants to merge 3 commits into from
Closed

Implement receiveOrClosed #762

wants to merge 3 commits into from

Conversation

qwwdfsad
Copy link
Member

Fixes #330

…ng extensions with the same semantic and generic ': Any' bound. Rename ReceiveResult to ValueOrClosed for consistency.
Copy link
Contributor

@elizarov elizarov left a comment

Choose a reason for hiding this comment

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

It looks like we have to wait until https://youtrack.jetbrains.com/issue/KT-27524 is resolved before we can merge this feature. Otherwise, when this Kotlin compiler issue is resolved, it is going to introduce an ugly binary-incompatible change to the ReceiveChannel.receiveOrClosed interface function which is Ok for an experimental inline classes feature, but that will be very hard to manage from the standpoint of a stable kotlinx.coroutines library.

@qwwdfsad qwwdfsad force-pushed the develop branch 3 times, most recently from bc68d63 to 3179683 Compare November 12, 2018 11:49
@qwwdfsad qwwdfsad force-pushed the develop branch 4 times, most recently from 1837412 to 1748ce1 Compare April 18, 2019 11:49
@elizarov elizarov mentioned this pull request Jul 16, 2019
@elizarov
Copy link
Contributor

elizarov commented Jul 16, 2019

An awesome piece of work! I've successfully cherry-picked all three commits to PR #1343 (consume-as-flow branch) with a few minor exceptions:

  • Channel.receiveOrClosed/onReciveOrClosed and ValueOrClosed are internal for now, until KT-27524 is resolved.
  • Thus we cannot mention them full in documentation just yet, so doc changes to select-expression.md cannot be merged.
  • There are a couple of outstanding (non-resolved) issues in this conversation that should be either resolved or moved to Consume as flow #1343 (all resolved now)

Let's keep it open for future stabilization of ValueOrClose (making it public) but move discussion to #1343 for now.

@elizarov
Copy link
Contributor

It seems that with #330 we can finally close this PR for good.

@qwwdfsad qwwdfsad closed this Apr 21, 2021
@qwwdfsad qwwdfsad deleted the receive-or-closed branch September 3, 2021 12:44
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

2 participants