https://kotlinlang.org logo
Title
k

kevin.cianfarini

09/03/2019, 9:29 PM
is there a way to get the associated
Job
from a coroutine context?
d

Dominaezzz

09/03/2019, 9:32 PM
coroutineContext[Job]
?
k

kevin.cianfarini

09/03/2019, 9:33 PM
what do you pass in for
Job
there?
I'm trying to get the job off of
lifecycleScope
d

Dominaezzz

09/03/2019, 9:35 PM
val job = lifecycleScope.coroutineContext[Job]
.
what do you pass in for
Job
there?
What do you mean?
The companion object of
Job
is passed in.
k

kevin.cianfarini

09/03/2019, 9:37 PM
Okay that makes more sense I think
thanks!
g

gildor

09/03/2019, 11:26 PM
what do you pass in for
Job
there?
Just curious. Why do you need this?
k