Skip to content

Commit

Permalink
Fix wrong docs on Job.join (Kotlin#2616)
Browse files Browse the repository at this point in the history
* Fix wrong docs on Job.join and Job.cancelAndJoin

Fixes Kotlin#2615
  • Loading branch information
elizarov authored and pablobaxter committed Sep 14, 2022
1 parent e650a5d commit f01ac40
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions kotlinx-coroutines-core/common/src/Job.kt
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@ public interface Job : CoroutineContext.Element {
* suspending function is invoked or while it is suspended, this function
* throws [CancellationException].
*
* 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
* [CancellationException] if the child had failed, since a failure of a child coroutine cancels parent by default,
* unless the child was launched from within [supervisorScope].
*
* This function can be used in [select] invocation with [onJoin] clause.
* Use [isCompleted] to check for a completion of this job without waiting.
Expand Down Expand Up @@ -498,9 +498,9 @@ internal fun Job.disposeOnCompletion(handle: DisposableHandle): DisposableHandle
* suspending function is invoked or while it is suspended, this function
* throws [CancellationException].
*
* In particular, it means that a parent coroutine invoking `cancelAndJoin` 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 `cancelAndJoin` on a child coroutine throws
* [CancellationException] if the child had failed, since a failure of a child coroutine cancels parent by default,
* unless the child was launched from within [supervisorScope].
*
* This is a shortcut for the invocation of [cancel][Job.cancel] followed by [join][Job.join].
*/
Expand Down

0 comments on commit f01ac40

Please sign in to comment.