I have a `suspend` method that gets dynamically ov...
# coroutines
j
I have a
suspend
method that gets dynamically overridden by Guice AOP. It appears that if I have a method handle and use
method.kotlinFunction.callSuspend(obj, *args)
to call that method, it fails because the wrapped method's
isSuspend
property is false (probably because it's dynamically generated by something that is not the kotlin compiler and doesn't know about suspend functions). It looks like I can use
suspendCoroutineUninterceptedOrReturn { method.kotlinFunction.call(obj, *args, it)}
to bypass the
isSuspend
check, but is that safe or is there another approach I should take?
e
It is safe.
j
👍 thanks!