-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Job join method documentation #2615
Labels
docs
KDoc and API reference
Comments
Good catch. Thanks. |
Thanks, now it's clear! |
@elizarov, Don't forget to change documentation for cancelAndJoin, it has the same statement. Thanks |
qwwdfsad
pushed a commit
that referenced
this issue
Apr 6, 2021
* Fix wrong docs on Job.join and Job.cancelAndJoin Fixes #2615
pablobaxter
pushed a commit
to pablobaxter/kotlinx.coroutines
that referenced
this issue
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
I have found very strange documentation for join method:
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.
I'm not sure that CoroutineExceptionHandler will have effect for CancellationException.
Example:
Output:
handle join CoroutineExceptionHandler got java.io.IOException
So basically CancellationException will still be thrown regardless any installed handlers.
The text was updated successfully, but these errors were encountered: