Soumen pal
04/18/2026, 5:42 PMstreetsofboston
04/18/2026, 6:01 PMstreetsofboston
04/18/2026, 6:03 PMAditya Bhaskar
04/18/2026, 7:13 PMAditya Bhaskar
04/18/2026, 7:15 PMCiaran Sloan
04/18/2026, 7:37 PMSoumen pal
04/18/2026, 7:45 PMfun getData() {
viewModelScope.launch(){
val result = withContext(<http://Dispatchers.IO|Dispatchers.IO>){
repo.getData()
}
result.fold(_...)
}Ciaran Sloan
04/19/2026, 6:41 AMrepo.getData could be invoked in the wrong thread. That isn't a concern of the caller. You'll also have boiler plate as every class that calls this function will have to wrap it in a `withContext`blockSoumen pal
04/20/2026, 3:36 AM์ ์ธํ
04/21/2026, 3:22 AMSoumen pal
04/21/2026, 7:31 AM์ ์ธํ
04/22/2026, 1:30 AM