Erik
05/01/2024, 2:01 PMHttpClient
extends CoroutineScope
. Is it safe and recommended to use this scope to launch coroutines, e.g. to implement logic tied to the client's lifecycle?Erik
05/01/2024, 2:04 PMIt is also the application coroutine scope that is cancelled immediately at application stop so useful for launching background coroutines.My assumption is that the design of the
HttpClient
being a CoroutineScope
behaves similarly: as long as its scope isn't cancelled, it could actually be the best place to launch your coroutines?Aleksei Tirman [JB]
05/07/2024, 9:26 AMIs it safe and recommended to use this scope to launch coroutines, e.g. to implement logic tied to the client's lifecycle?Yes.
Erik
05/07/2024, 9:26 AMErik
05/07/2024, 9:27 AM