In the coroutines documentation, it's stated about
join
(link) that if called on a coroutine that's cancelled, it will throw an
CancellationException
. However, in this example from the official docs,
job.join()
is called right after
job.cancel
, yet it does not throw anything. Why not ?
g
gildor
12/24/2020, 8:20 AM
join() doesn’t throw CancellationException if Job is cancelled, it will throw CancellatioException only if corotine from which join() is called is cancelled