https://kotlinlang.org logo
Title
a

Ajaydeepak07

06/03/2021, 5:47 AM
suspend fun doCall(list: ArrayList<String>) {
       list.forEach {
           Api.retrofitService.getProperties(it)
       }

}
In this code getProperties() is another suspend function that needs to be called inside doCall() if my list is having more than 1 item for the first item the network call happens and when the iteration comes for next item the list is null
u

uli

06/04/2021, 11:44 AM
Wild guess. Is the list modified concurrently on another thread?
a

Ajaydeepak07

06/05/2021, 7:42 AM
no its not modified
this is the only place its used thats why