so basically coroutinecontext have a scope and the...
# coroutines
c
so basically coroutinecontext have a scope and these are coroutinescope which provides lifecycle to coroutine.
d
CoroutineScope
has the
CoroutineContext
. A
CoroutineContext
can have various elements, the type of element that enforces lifecyle is
Job
.
CoroutineScope
says by convention that it's provided context should always have a job. If you then call
scope.launch
the resulting job will have the scope's job as parent, so it will "inherit the lifecycle".
📸 2