Update to Coroutine 1.3.0-RC2
This updates brings full interoperability between Reactor and Coroutines contexts. Closes gh-22986
This commit is contained in:
@@ -24,7 +24,7 @@ import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.async
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.reactive.awaitFirstOrNull
|
||||
import kotlinx.coroutines.reactive.flow.asPublisher
|
||||
import kotlinx.coroutines.reactor.asFlux
|
||||
|
||||
import kotlinx.coroutines.reactor.mono
|
||||
import reactor.core.publisher.Mono
|
||||
@@ -68,7 +68,7 @@ internal fun invokeHandlerMethod(method: Method, bean: Any, vararg args: Any?):
|
||||
.let { if (it == Unit) null else it }
|
||||
}.onErrorMap(InvocationTargetException::class.java) { it.targetException }
|
||||
if (function.returnType.classifier == Flow::class) {
|
||||
mono.flatMapMany { (it as Flow<Any>).asPublisher() }
|
||||
mono.flatMapMany { (it as Flow<Any>).asFlux() }
|
||||
}
|
||||
else {
|
||||
mono
|
||||
|
||||
Reference in New Issue
Block a user