
Let's Make a Callback Suspend: suspendCancellableCoroutine, Line by Line
Wrapping a callback API in a suspend function is four lines. The fifth line — invokeOnCancellation — is the one that decides whether cancelling actually stops anything, and it's the one people leave out.


