if I pass a `MainScope()` into a class that create...
# coroutines
b
if I pass a
MainScope()
into a class that creates a ktor
HttpClient
to use for the lifetime of the scope, is there an idiomatic way to cleanup the client when the scope is cancelled? I can only think of launching a do-nothing coroutine that uses
awaitCancellation
or using
job.invokeOnCompletion
. I'm not sure if one of these are a good method or if there's something else?