I have a function that I need to make async: ``` f...
# coroutines
m
I have a function that I need to make async:
Copy code
fun createRenders(pkg: Package, renderOutputDir: File, renderedAt: Instant): Set<Render> {
  return pkg.templates.map { renderTemplatePath ->{ 
    //...
   }.toSet()
I need to make it async since I am adding a function that is `suspend`ed so I figured I could do something like this:
Copy code
Set<Render> {
  return pkg.templates.map { renderTemplatePath ->{ 
    launch {
       timer.time{
         //...
      }
    }
   }.toSet()
but obviously, the return is not a
Render
but a
Job
. How can I make it a
Render
again?