i'm stuck on an issue where i'm going from an akka...
# coroutines
d
i'm stuck on an issue where i'm going from an akka stream via function to a suspended function, but the suspended function isn't returning. I presume I'm doing something wrong, but don't know how to narrow the issue further. any tips? p.s. are there tracing facilities for coroutines?
Copy code
private fun processMessage(record: KafkaMessage) {
    runBlocking {
        launch {
            handler.doSomething(record.data) // its implementation simply returns
            log.debug("2") // NOT CALLED
        }.join()
    }
}
d
Maybe an uncaught exception? Launch has a tendancy of hiding them... try
async { }.await()
, itll throw if there is an exception...
d
tried that too..i tried making the function return a boolean and used async/await, but same result. thanks though
e
It is hard to troubleshoot. Can you do a shorter example? Anyway, neither launch/join, nor async/await are needed. Just do
Copy code
runBlocking { handler.doSomething(...) }
d
thanks for the improvement - still the same problem. if i remove the coroutine usage it works, so i'm guessing it's an akka <-> coroutines issue. i'll create a small sample app.