Why CancellationException Should Be Rethrown
Reference It’s easier to understand if you think of a thread’s interrupt as a job’s cancel. When using runCatching, you must write code to rethrow the CancellationException. Kotlin does not provide a convenience method for this. - Related Issue Reason When a job is cancelled, it should not continue running. However, if you catch a CancellationException, the job may continue to run, so it is recommended to rethrow it. Problematic Code If you do not rethrow, a job that is already cancelled may continue to run. ...