marcelo
11/02/2018, 10:11 PMasync and await?Jonathan Walsh
11/02/2018, 10:24 PMasync is what you need along with awaitAllmarcelo
11/02/2018, 10:25 PMJonathan Walsh
11/02/2018, 10:25 PMreturn pkg.templates.map { renderTemplatePath ->{
async {
timer.time{
//...
}
}
}.awaitAll().toSet()marcelo
11/02/2018, 10:25 PMJonathan Walsh
11/02/2018, 10:25 PMFelix
11/02/2018, 10:34 PMawaitAll is also a suspend function, so you can only call if from another suspend function or lambda.Felix
11/02/2018, 10:35 PMcreateRenders async? What blocking operations are you doing inside it?marcelo
11/02/2018, 10:38 PMmarcelo
11/02/2018, 10:38 PMtimer function which does the async insidemarcelo
11/02/2018, 10:38 PMnwh
11/03/2018, 12:20 AMcreateRenders a suspending function?marcelo
11/03/2018, 2:20 AMcreateRenders is a legacy app that I inherited.