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

Update CancellableContinuation documentation #4268

Merged
merged 2 commits into from
Nov 8, 2024
Merged

Update CancellableContinuation documentation #4268

merged 2 commits into from
Nov 8, 2024

Conversation

qwwdfsad
Copy link
Contributor

@qwwdfsad qwwdfsad commented Nov 6, 2024

No description provided.

@qwwdfsad qwwdfsad requested a review from dkhalanskyjb November 6, 2024 17:57
*/
public val isCompleted: Boolean

/**
* Returns `true` if this continuation was [cancelled][cancel].
* Returns `true` if this continuation was [cancelled][CancellableContinuation.cancel].
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this needed? Do we need to introduce such a fix throughout the documentation of every class/interface referring to its other members? I hope not: if just writing [cancel] is problematic, to me, this looks like a bug in our documentation tooling.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted to be more explicit, I can revert that if you believe it's important.
I.e. it could've been some top-level cancel, too much of a context to process at once

Copy link
Collaborator

Choose a reason for hiding this comment

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

If it's just a stylistic choice (that no one except the ones reading pure KDoc text will see?), it's not important to me either way, but if this is needed for the link to correctly resolve, that's alarming.

@qwwdfsad qwwdfsad merged commit 06395bc into develop Nov 8, 2024
1 check passed
@qwwdfsad qwwdfsad deleted the cc-doc branch November 8, 2024 10:45
*
* Cancellable continuation has three states (as subset of [Job] states):
* [CancellableContinuation] provides the capability to work with values that represent a resource that should be
* closed. For that, it provides `resume(value: R, onCancellation: ((cause: Throwable, value: R, context: CoroutineContext) -> Unit)`
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* closed. For that, it provides `resume(value: R, onCancellation: ((cause: Throwable, value: R, context: CoroutineContext) -> Unit)`
* closed. For that, it provides `resume(value: R, onCancellation: ((cause: Throwable, value: R, context: CoroutineContext) -> Unit)?)`

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.

3 participants