https://kotlinlang.org logo
#coroutines
Title
# coroutines
r

rdhruva

07/30/2018, 5:12 PM
hi, anyone have a good guide / blog posts or hints on writing a custom
CoroutineContext
? Context: In my android app, I have a “god” object that handles all the network api calls and responses (using callbacks), and has its own lifecycle of sorts: I’m trying to write a
CoroutineContext
that will allow me to write coroutines that dispatch to the
DefaultDispatcher
but are aware of the lifecycle of this god object
🙈 2
😱 1
g

gildor

08/01/2018, 6:51 AM
You can do something like this of course, but it’s not exactly clear how you could work, so hard to recommend something particular. You can check Job implementation to understand how to write own one that respects lifcycle of your component
👍 1
2 Views