Gilles Barbier
02/05/2021, 9:48 PMsuspend fun test() {
o.method()
}
here, o is a proxy obtained by Proxy.newProxyInstance(..., proxyHandler). So this will call the invoke method of proxyHandler. My question is: how can I propagate the suspend up to proxyHandler and use a suspend function from its handle method (without having to start a runBlocking of course) ?jw
02/05/2021, 10:28 PMContinuation argument from the Proxy's Object[] and then invoke the suspend function from Java.jw
02/05/2021, 10:29 PMjw
02/05/2021, 10:43 PMa.method() is a suspend fun itself. Otherwise runBlocking is your only recourse.Gilles Barbier
02/05/2021, 10:54 PM