What's the difference between CancellationException from kotlin-stdlib and the one from kotlinx-coroutines-core?

Both packages have a CancellationException, but they do not seem to be synonymous. Rather, the one from stdlib is used in some platforms, but not in others. Is the intent to eventually deprecate kotlinx’ version, or to just make it a typealias of the stdlib’s version across all platforms? And, for now, is it recommended to stick to kotlinx’ version (unless one is using coroutines completely without kotlinx-coroutines)?

1 Like