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

Fix wrong docs on Job.join #2616

Merged
merged 2 commits into from Apr 6, 2021
Merged

Fix wrong docs on Job.join #2616

merged 2 commits into from Apr 6, 2021

Conversation

elizarov
Copy link
Contributor

Fixes #2615

@elizarov elizarov requested a review from qwwdfsad March 30, 2021 08:12
@serddmit
Copy link

Don't forget to change documentation for cancelAndJoin, it has the same statement.
https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/cancel-and-join.html

* In particular, it means that a parent coroutine invoking `join` on a child coroutine that was started using
* `launch(coroutineContext) { ... }` builder throws [CancellationException] if the child
* had crashed, unless a non-standard [CoroutineExceptionHandler] is installed in the context.
* In particular, it means that a parent coroutine invoking `join` on a child coroutine throws
Copy link
Member

Choose a reason for hiding this comment

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

I'd suggest removing the whole paragraph, now it seems to be redundant.
Also, please fix the same phrasing for cancelAndJoin

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 think this explanation still makes sense as it is quite counter-intuitive for people that you can crash an attempt to join another coroutine.

@elizarov elizarov requested a review from qwwdfsad March 30, 2021 18:57
@qwwdfsad qwwdfsad merged commit 7ae273c into develop Apr 6, 2021
@qwwdfsad qwwdfsad deleted the join-doc-fix branch April 6, 2021 10:23
pablobaxter pushed a commit to pablobaxter/kotlinx.coroutines that referenced this pull request Sep 14, 2022
* Fix wrong docs on Job.join and Job.cancelAndJoin

Fixes Kotlin#2615
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.

None yet

3 participants