Skip to content

Commit d0597e7

Browse files
Liming.Shielizarov
authored andcommitted
Replace deprecated setCancellation with onDipose for Project Reactor
reactor.core.Cancellation is removed from project reactor from 3.1.0.M1
1 parent 466bfa2 commit d0597e7

File tree

1 file changed

+1
-1
lines changed
  • reactive/kotlinx-coroutines-reactor/src/main/kotlin/kotlinx/coroutines/experimental/reactor

1 file changed

+1
-1
lines changed

reactive/kotlinx-coroutines-reactor/src/main/kotlin/kotlinx/coroutines/experimental/reactor/Mono.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ fun <T> mono(
4343
val newContext = newCoroutineContext(context)
4444
val coroutine = MonoCoroutine(newContext, sink)
4545
coroutine.initParentJob(context[Job])
46-
sink.setCancellation(coroutine)
46+
sink.onDispose(coroutine)
4747
block.startCoroutine(coroutine, coroutine)
4848
}
4949

0 commit comments

Comments
 (0)