Is a scope unable to be launched twice? I.e. after...
# coroutines
j
Is a scope unable to be launched twice? I.e. after finishing or being cancelled?
o
you cannot create children of a Job after it has finished/cancelled, no. if you need a scope (Job) for more than one
launch
call that may fail, use
SupervisorJob
, so that failures of the child Jobs do not cancel the parent job
s
Scopes are not launched… Coroutines are launched, from within a scope. When a scope has finished (either by cancelation or by an exception), it is dead. It can not be (re-)used for future calls to
launch
or
async
to launch new coroutines
👍 1