aboutsummaryrefslogtreecommitdiff
path: root/kotlinx-coroutines-core
diff options
context:
space:
mode:
authorSokolovaMaria <marysok17@gmail.com>2019-08-09 17:35:14 +0300
committerVsevolod Tolstopyatov <qwwdfsad@gmail.com>2019-08-09 17:35:14 +0300
commit1dcfd972db7853b551f5f6c636c9308876a562a6 (patch)
treef16f640bbdb53ed490208d10c4b825994f4f9b84 /kotlinx-coroutines-core
parentc7e9b561e4d570150528bde601b17463627de329 (diff)
downloadkotlinx.coroutines-1dcfd972db7853b551f5f6c636c9308876a562a6.tar.gz
Coroutine context propagation for Reactor to coroutines API migration (#1377)
* Propagation of the coroutine context of await calls into Mono/Flux builder * Publisher.asFlow propagates coroutine context from `collect` call to the Publisher * Flow.asFlux transform * Optimized FlowSubscription * kotlinx.coroutines.reactor.flow package is replaced with kotlinx.coroutines.reactor Fixes #284
Diffstat (limited to 'kotlinx-coroutines-core')
-rw-r--r--kotlinx-coroutines-core/common/src/intrinsics/Cancellable.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/kotlinx-coroutines-core/common/src/intrinsics/Cancellable.kt b/kotlinx-coroutines-core/common/src/intrinsics/Cancellable.kt
index c442c95a..246ae2c2 100644
--- a/kotlinx-coroutines-core/common/src/intrinsics/Cancellable.kt
+++ b/kotlinx-coroutines-core/common/src/intrinsics/Cancellable.kt
@@ -12,7 +12,8 @@ import kotlin.coroutines.intrinsics.*
* Use this function to start coroutine in a cancellable way, so that it can be cancelled
* while waiting to be dispatched.
*/
-internal fun <T> (suspend () -> T).startCoroutineCancellable(completion: Continuation<T>) = runSafely(completion) {
+@InternalCoroutinesApi
+public fun <T> (suspend () -> T).startCoroutineCancellable(completion: Continuation<T>) = runSafely(completion) {
createCoroutineUnintercepted(completion).intercepted().resumeCancellable(Unit)
}