Skip to content
RED SAG Skills
hardStudy question · answer published in Kotlin interview questions, so no pointsandroidcoroutines

Suspending in finally after cancel

After this coroutine is cancelled, the server never gets the "release" call. Why, and what is the fix?

try {
    api.lock(id)
    doWork()
} finally {
    api.release(id) // suspend fun
}
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions