nitrog42
09/24/2019, 8:18 AMsuspend fun mappingFunction(dataToMap: List<String>) {
val mappedData = dataToMap.map {
}
// run suspendable work with mappedData
}
gildor
09/24/2019, 8:20 AMnitrog42
09/24/2019, 8:23 AMnitrog42
09/24/2019, 8:23 AMgildor
09/24/2019, 8:31 AMreturn
, no need to use label in this casegildor
09/24/2019, 8:34 AMmap
if you call any other suspend function it will be cancelled, if you do not call any suspend functions, so don’t have any cancellation points, you can call yield()
which creates empty suspend (and cancellation) pointgildor
09/24/2019, 8:37 AMnitrog42
09/24/2019, 8:55 AMgildor
09/24/2019, 9:00 AMnitrog42
10/14/2019, 8:14 AM