Maroš Šeleng
05/22/2022, 7:16 PMCancellationException
s related to coroutines? First, there is kotlin.coroutines.cancellation.CancellationException
, which is part of kotlin-stdlib:1.6.21
and there is also kotlinx.coroutines.CancellationException
which comes from kotlinx-coroutines-core-jvm:1.6.1
. I can see that they are both just typealiases for java.util.concurrent.CancellationException
so in the end it doesn’t matter, but it tends to cause mess in the code.Rick Clephas
09/01/2023, 7:27 AMCancellationException
from kotlinx-coroutines has been present for a long time (before Kotlin 1.4). The CancellationException
in stdlib has only been there since Kotlin 1.4.
In the current versions of kotlinx-coroutines the CancellationException
is actually a typealias for the one in stdlib. So effectively there is no difference between the two.