vlastachu
10/03/2017, 1:35 PMval dbContext = newSingleThreadContext("dbContext")
Then send this to 10 objects (starting size of infinite recyclerview). Then see in profiler that created multiple threads. But not 10. It is just 3 simultaneous threads and they recreates on new requests. Can someone explain that?
I use it like this:
async(UI) {
val dateInfos = async(dbContext) {
List(daysInMonth) { n ->
dateInfoProvider.getDateInfo(startDate.plusDays(n))
}
}.await()
dayCells = async(dbContext) { updateDayCell(dateInfos) }.await()
onLoaded(this@MonthInfo)
}