Pramod Shri
11/04/2023, 11:04 AMsuspend function can be called from a coroutine
error. How to call a suspend function from inside a consumer?
cluster.transactions().run { context ->
setContextForDelete(node, context) // setContext... is a suspend function
}
hfhbd
11/04/2023, 11:18 AMPramod Shri
11/04/2023, 11:29 AMjw
11/04/2023, 12:16 PMPramod Shri
11/04/2023, 12:18 PMPramod Shri
11/05/2023, 10:12 AMhfhbd
11/05/2023, 10:29 AMmyanmarking
11/06/2023, 10:12 AMsuspend fun someWork () {
val result = CompletableDeferred<Context>()
val listener = object : Transaction{
override fun run(context: Context) {
result.complete(context)
}
}
try {
addListener(listener)
result.await()
}finally {
removeListener(listener)
}
}
myanmarking
11/06/2023, 10:14 AM