The only other way I could do this is to add an `i...
# coroutines
k
The only other way I could do this is to add an
invokeOnCompletion
to the returned Job for
launch
, but that takes away the fun since I have to repeat it everywhere
e
kingsley: It might be also possible with some kind of DI. I have played with it yet, though.
k
Yes. I thought about that too. Making the repository instance scoped to the activity. While I don't get to repeat much conpared to
invokeOnCompletion
, it definitely introduces a couple other complexities.
Would have loved if it were possible to promote the
Deferred
object in a way, so I gets aware of the cancellation context. Something like
asyncOp.await(job)
for example, but I don't think there is any mechanism to achieve that
I'll try passing the job around for now, see how comfortable I'm able to get with it
@elizarov ^