File tree 2 files changed +14
-4
lines changed
kotlinx-coroutines-core/common/src
2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,9 @@ public interface CompletableDeferred<T> : Deferred<T> {
26
26
*
27
27
* Repeated invocations of this function have no effect and always produce `false`.
28
28
*
29
- * Note, that if this deferred has children, then it transitions into _completing_ state and becomes _complete_
30
- * once all its children are _complete_. See [Job] for details.
29
+ * This function transitions this deferred into _completed_ state if it was not completed or cancelled yet.
30
+ * However, if this deferred has children, then it transitions into _completing_ state and becomes _complete_
31
+ * once all its children are [complete][isCompleted]. See [Job] for details.
31
32
*/
32
33
public fun complete (value : T ): Boolean
33
34
@@ -36,6 +37,10 @@ public interface CompletableDeferred<T> : Deferred<T> {
36
37
* completed as a result of this invocation and `false` otherwise (if it was already completed).
37
38
*
38
39
* Repeated invocations of this function have no effect and always produce `false`.
40
+ *
41
+ * This function transitions this deferred into _cancelled_ state if it was not completed or cancelled yet.
42
+ * However, that if this deferred has children, then it transitions into _cancelling_ state and becomes _cancelled_
43
+ * once all its children are [complete][isCompleted]. See [Job] for details.
39
44
*/
40
45
public fun completeExceptionally (exception : Throwable ): Boolean
41
46
}
Original file line number Diff line number Diff line change @@ -15,8 +15,9 @@ public interface CompletableJob : Job {
15
15
*
16
16
* Repeated invocations of this function have no effect and always produce `false`.
17
17
*
18
- * Note, that if this job has children, then it transitions into _completing_ state and becomes _complete_
19
- * once all its children are _complete_. See [Job] for details.
18
+ * This function transitions this job into _completed- state if it was not completed or cancelled yet.
19
+ * However, that if this job has children, then it transitions into _completing_ state and becomes _complete_
20
+ * once all its children are [complete][isCompleted]. See [Job] for details.
20
21
*/
21
22
public fun complete (): Boolean
22
23
@@ -25,6 +26,10 @@ public interface CompletableJob : Job {
25
26
* completed as a result of this invocation and `false` otherwise (if it was already completed).
26
27
*
27
28
* Repeated invocations of this function have no effect and always produce `false`.
29
+ *
30
+ * This function transitions this job into _cancelled_ state if it was not completed or cancelled yet.
31
+ * However, that if this job has children, then it transitions into _cancelling_ state and becomes _cancelled_
32
+ * once all its children are [complete][isCompleted]. See [Job] for details.
28
33
*/
29
34
public fun completeExceptionally (exception : Throwable ): Boolean
30
35
}
You can’t perform that action at this time.
0 commit comments