In the coroutines documentation, it's stated about...
# announcements
a
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
join() doesn’t throw CancellationException if Job is cancelled, it will throw CancellatioException only if corotine from which join() is called is cancelled
If the Job of the invoking coroutine
It references coroutine which invoking join()
a
Got it. Thanks