Follow up: fix typos in coroutine docs
This commit is contained in:
@@ -9,15 +9,15 @@ import kotlin.coroutines.*
|
|||||||
import kotlin.internal.InlineOnly
|
import kotlin.internal.InlineOnly
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts unintercepted coroutine without receiver and with result type [T] and executes it until its first suspension.
|
* Starts an unintercepted coroutine without a receiver and with result type [T] and executes it until its first suspension.
|
||||||
* Returns the result of the coroutine or throws its exception if it does not suspend or [COROUTINE_SUSPENDED] if it suspends.
|
* Returns the result of the coroutine or throws its exception if it does not suspend or [COROUTINE_SUSPENDED] if it suspends.
|
||||||
* In the latter case, the [completion] continuation is invoked when coroutine completes with result or exception.
|
* In the latter case, the [completion] continuation is invoked when the coroutine completes with a result or an exception.
|
||||||
*
|
*
|
||||||
* The coroutine is started directly in the invoker's thread without going through the [ContinuationInterceptor] that might
|
* The coroutine is started directly in the invoker's thread without going through the [ContinuationInterceptor] that might
|
||||||
* be present in the completion's [CoroutineContext]. It is the invoker's responsibility to ensure that a proper invocation
|
* be present in the completion's [CoroutineContext]. It is the invoker's responsibility to ensure that a proper invocation
|
||||||
* context is established.
|
* context is established.
|
||||||
*
|
*
|
||||||
* This function is designed to be used from inside of [suspendCoroutineUninterceptedOrReturn] to resume the execution of a suspended
|
* This function is designed to be used from inside of [suspendCoroutineUninterceptedOrReturn] to resume the execution of the suspended
|
||||||
* coroutine using a reference to the suspending function.
|
* coroutine using a reference to the suspending function.
|
||||||
*/
|
*/
|
||||||
@SinceKotlin("1.3")
|
@SinceKotlin("1.3")
|
||||||
@@ -27,15 +27,15 @@ public actual inline fun <T> (suspend () -> T).startCoroutineUninterceptedOrRetu
|
|||||||
): Any? = this.asDynamic()(completion, false)
|
): Any? = this.asDynamic()(completion, false)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts unintercepted coroutine with receiver type [R] and result type [T] and executes it until its first suspension.
|
* Starts an unintercepted coroutine with receiver type [R] and result type [T] and executes it until its first suspension.
|
||||||
* Returns the result of the coroutine or throws its exception if it does not suspend or [COROUTINE_SUSPENDED] if it suspends.
|
* Returns the result of the coroutine or throws its exception if it does not suspend or [COROUTINE_SUSPENDED] if it suspends.
|
||||||
* In the latter case, the [completion] continuation is invoked when coroutine completes with result or exception.
|
* In the latter case, the [completion] continuation is invoked when the coroutine completes with a result or an exception.
|
||||||
*
|
*
|
||||||
* The coroutine is started directly in the invoker's thread without going through the [ContinuationInterceptor] that might
|
* The coroutine is started directly in the invoker's thread without going through the [ContinuationInterceptor] that might
|
||||||
* be present in the completion's [CoroutineContext]. It is the invoker's responsibility to ensure that a proper invocation
|
* be present in the completion's [CoroutineContext]. It is the invoker's responsibility to ensure that a proper invocation
|
||||||
* context is established.
|
* context is established.
|
||||||
*
|
*
|
||||||
* This function is designed to be used from inside of [suspendCoroutineUninterceptedOrReturn] to resume the execution of a suspended
|
* This function is designed to be used from inside of [suspendCoroutineUninterceptedOrReturn] to resume the execution of the suspended
|
||||||
* coroutine using a reference to the suspending function.
|
* coroutine using a reference to the suspending function.
|
||||||
*/
|
*/
|
||||||
@SinceKotlin("1.3")
|
@SinceKotlin("1.3")
|
||||||
@@ -122,7 +122,7 @@ public actual fun <R, T> (suspend R.() -> T).createCoroutineUnintercepted(
|
|||||||
*
|
*
|
||||||
* This function shall be used on the immediate result of [createCoroutineUnintercepted] or [suspendCoroutineUninterceptedOrReturn],
|
* This function shall be used on the immediate result of [createCoroutineUnintercepted] or [suspendCoroutineUninterceptedOrReturn],
|
||||||
* in which case it checks for [ContinuationInterceptor] in the continuation's [context][Continuation.context],
|
* in which case it checks for [ContinuationInterceptor] in the continuation's [context][Continuation.context],
|
||||||
* invokes [ContinuationInterceptor.interceptContinuation], caches and returns result.
|
* invokes [ContinuationInterceptor.interceptContinuation], caches and returns the result.
|
||||||
*
|
*
|
||||||
* If this function is invoked on other [Continuation] instances it returns `this` continuation unchanged.
|
* If this function is invoked on other [Continuation] instances it returns `this` continuation unchanged.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -14,15 +14,15 @@ import kotlin.coroutines.jvm.internal.*
|
|||||||
import kotlin.internal.InlineOnly
|
import kotlin.internal.InlineOnly
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts unintercepted coroutine without receiver and with result type [T] and executes it until its first suspension.
|
* Starts an unintercepted coroutine without a receiver and with result type [T] and executes it until its first suspension.
|
||||||
* Returns the result of the coroutine or throws its exception if it does not suspend or [COROUTINE_SUSPENDED] if it suspends.
|
* Returns the result of the coroutine or throws its exception if it does not suspend or [COROUTINE_SUSPENDED] if it suspends.
|
||||||
* In the latter case, the [completion] continuation is invoked when coroutine completes with result or exception.
|
* In the latter case, the [completion] continuation is invoked when the coroutine completes with a result or an exception.
|
||||||
*
|
*
|
||||||
* The coroutine is started directly in the invoker's thread without going through the [ContinuationInterceptor] that might
|
* The coroutine is started directly in the invoker's thread without going through the [ContinuationInterceptor] that might
|
||||||
* be present in the completion's [CoroutineContext]. It is the invoker's responsibility to ensure that a proper invocation
|
* be present in the completion's [CoroutineContext]. It is the invoker's responsibility to ensure that a proper invocation
|
||||||
* context is established.
|
* context is established.
|
||||||
*
|
*
|
||||||
* This function is designed to be used from inside of [suspendCoroutineUninterceptedOrReturn] to resume the execution of a suspended
|
* This function is designed to be used from inside of [suspendCoroutineUninterceptedOrReturn] to resume the execution of the suspended
|
||||||
* coroutine using a reference to the suspending function.
|
* coroutine using a reference to the suspending function.
|
||||||
*/
|
*/
|
||||||
@SinceKotlin("1.3")
|
@SinceKotlin("1.3")
|
||||||
@@ -32,15 +32,15 @@ public actual inline fun <T> (suspend () -> T).startCoroutineUninterceptedOrRetu
|
|||||||
): Any? = (this as Function1<Continuation<T>, Any?>).invoke(completion)
|
): Any? = (this as Function1<Continuation<T>, Any?>).invoke(completion)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts unintercepted coroutine with receiver type [R] and result type [T] and executes it until its first suspension.
|
* Starts an unintercepted coroutine with receiver type [R] and result type [T] and executes it until its first suspension.
|
||||||
* Returns the result of the coroutine or throws its exception if it does not suspend or [COROUTINE_SUSPENDED] if it suspends.
|
* Returns the result of the coroutine or throws its exception if it does not suspend or [COROUTINE_SUSPENDED] if it suspends.
|
||||||
* In the latter case, the [completion] continuation is invoked when coroutine completes with result or exception.
|
* In the latter case, the [completion] continuation is invoked when the coroutine completes with a result or an exception.
|
||||||
*
|
*
|
||||||
* The coroutine is started directly in the invoker's thread without going through the [ContinuationInterceptor] that might
|
* The coroutine is started directly in the invoker's thread without going through the [ContinuationInterceptor] that might
|
||||||
* be present in the completion's [CoroutineContext]. It is the invoker's responsibility to ensure that a proper invocation
|
* be present in the completion's [CoroutineContext]. It is the invoker's responsibility to ensure that a proper invocation
|
||||||
* context is established.
|
* context is established.
|
||||||
*
|
*
|
||||||
* This function is designed to be used from inside of [suspendCoroutineUninterceptedOrReturn] to resume the execution of a suspended
|
* This function is designed to be used from inside of [suspendCoroutineUninterceptedOrReturn] to resume the execution of the suspended
|
||||||
* coroutine using a reference to the suspending function.
|
* coroutine using a reference to the suspending function.
|
||||||
*/
|
*/
|
||||||
@SinceKotlin("1.3")
|
@SinceKotlin("1.3")
|
||||||
@@ -128,7 +128,7 @@ public actual fun <R, T> (suspend R.() -> T).createCoroutineUnintercepted(
|
|||||||
*
|
*
|
||||||
* This function shall be used on the immediate result of [createCoroutineUnintercepted] or [suspendCoroutineUninterceptedOrReturn],
|
* This function shall be used on the immediate result of [createCoroutineUnintercepted] or [suspendCoroutineUninterceptedOrReturn],
|
||||||
* in which case it checks for [ContinuationInterceptor] in the continuation's [context][Continuation.context],
|
* in which case it checks for [ContinuationInterceptor] in the continuation's [context][Continuation.context],
|
||||||
* invokes [ContinuationInterceptor.interceptContinuation], caches and returns result.
|
* invokes [ContinuationInterceptor.interceptContinuation], caches and returns the result.
|
||||||
*
|
*
|
||||||
* If this function is invoked on other [Continuation] instances it returns `this` continuation unchanged.
|
* If this function is invoked on other [Continuation] instances it returns `this` continuation unchanged.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public expect inline fun <T> (suspend () -> T).startCoroutineUninterceptedOrRetu
|
|||||||
* be present in the completion's [CoroutineContext]. It is the invoker's responsibility to ensure that a proper invocation
|
* be present in the completion's [CoroutineContext]. It is the invoker's responsibility to ensure that a proper invocation
|
||||||
* context is established.
|
* context is established.
|
||||||
*
|
*
|
||||||
* This function is designed to be used from inside of [suspendCoroutineUninterceptedOrReturn] to resume the execution of a suspended
|
* This function is designed to be used from inside of [suspendCoroutineUninterceptedOrReturn] to resume the execution of the suspended
|
||||||
* coroutine using a reference to the suspending function.
|
* coroutine using a reference to the suspending function.
|
||||||
*/
|
*/
|
||||||
@SinceKotlin("1.3")
|
@SinceKotlin("1.3")
|
||||||
|
|||||||
Reference in New Issue
Block a user