``` private val callbackContext = ... fun request...
# coroutines
k
Copy code
private val callbackContext = ...

fun request(...) {
  pendingJob?.cancel()
  
  pendingJob = launch(callbackContext) {
    delay(DEBOUNCE_PERIOD)
    ...
    suspendingFun()
    ...
  }
}

suspend fun suspendingFun(...) {
  someApi().await()
  ...
}
This used to work fine in version 0.12. Currently on version 0.14, the launch block doesn't seem to execute more than once anymore. Not sure what the problem is
e
Can you produce a self-contained piece of code that reproduces the problem?
k
Hi @elizarov, I haven't been able to reproduce a self contained code. I'm guessing there was probably a change in how cancellations work somewhere along the line (can't find anything regarding that in the changelog though). So far, it works on 0.12, but not in any of the 0.14 variants, so I'm sticking with 0.12 till when I'm able to look closely into what exactly the problem might be.
e
I don't think anything cancellation-related has changed between 0.12 and 0.14