title: how to launch 10 coroutines in for loop and wait until all of them finish?
body: <p>I need to fill list of objects from DB. And before passing value to itemes I want all of them to finish. Is here any short way calling await() for each item to wait. I want to make clean code, May be some design pattern or trick?</p>
  
  <pre><code>    for (x in 0..10) {
          launch {
              withContext(Dispatchers.IO){
                  list.add(repository.getLastGame(x) ?: MutableLiveData&lt;Task&gt;(Task(cabinId = x)))
              }
  
          }
  
      }
      items.value = list
  </code></pre>