You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some coroutines are very likely to get cancelled a short time after they are launched, making the CancellationException stacktrace calculation into a large portion of the runtime.
This calls for an API that allows not populating the stacktraces but instead using a CancellationException object created in advance.
Options:
Cancel-site: cancel already can accept custom CancellationException variants, and withTimeout* could also be parameterized to allow this.
Throw-site: suspendCancellableContinuation could react to a special CoroutineContextElement specifying that the cancellation exception of the suspended coroutine itself does not need to be instantiated.