Rename CoroutinesUtils#invokeHandlerMethod to invokeSuspendingFunction

This commit is contained in:
Sebastien Deleuze
2019-09-03 23:39:39 +02:00
parent 2b4eb610a7
commit 9b33b0ad58
3 changed files with 5 additions and 5 deletions

View File

@@ -52,15 +52,15 @@ internal fun <T: Any> monoToDeferred(source: Mono<T>) =
GlobalScope.async(Dispatchers.Unconfined) { source.awaitFirstOrNull() }
/**
* Invoke an handler method converting suspending method to [Mono] or
* [reactor.core.publisher.Flux] if necessary.
* Invoke a suspending function converting it to [Mono] or [reactor.core.publisher.Flux]
* if necessary.
*
* @author Sebastien Deleuze
* @since 5.2
*/
@Suppress("UNCHECKED_CAST")
@ExperimentalCoroutinesApi
internal fun invokeHandlerMethod(method: Method, bean: Any, vararg args: Any?): Any? {
internal fun invokeSuspendingFunction(method: Method, bean: Any, vararg args: Any?): Any? {
val function = method.kotlinFunction!!
return if (function.isSuspend) {
val mono = mono(Dispatchers.Unconfined) {