title: Kotlin Async vs Launch
body: <p>Kotlin_version = '1.2.41'</p>
  
  <p>I am pretty new to Kotlin. I would like to know what's the difference between <code>async</code> and <code>launch</code>. Especially in the following code</p>
  
  <pre><code>import kotlinx.coroutines.experimental.async
  import kotlinx.coroutines.experimental.awaitAll
  import kotlinx.coroutines.experimental.delay
  import kotlinx.coroutines.experimental.launch
  import kotlinx.coroutines.experimental.runBlocking
  
  fun main(args: Array&lt;String&gt;) {
      runBlocking {
          (20..30).forEach {
              launch{
                  println("main before" + it)
                  val outer = it
                  delay(1000L)
                  val lists = (1..10)
                          .map { async{anotherMethod(outer, it)}}
                  println("main after------------------Awaiting" + it)
                  lists.awaitAll()
                  println("Done awaiting -main after-----------------" + it)
  
              }
  
  
          }
  
          println("Hello,") // main thread continues here immediately
      }
  }
  </code></pre>
  
  <p>.</p>
  
  <pre><code>suspend fun anotherMethod (outer: Int,index: Int){
      println("inner-b4----" + outer + "--" + index)
      delay(3000L)
      println("inner-After----" + outer + "--" + index)
  }
  </code></pre>
  
  <p>Vs</p>
  
  <pre><code>fun main(args: Array&lt;String&gt;) {
      runBlocking {
          (20..30).forEach {
              async{
                  println("main before" + it)
                  val outer = it
                  delay(1000L)
                  val lists = (1..10)
                          .map { async{anotherMethod(outer, it)}}
                  println("main after------------------Awaiting" + it)
                  lists.awaitAll()
                  println("Done awaiting -main after-----------------" + it)
  
              }
  
  
          }
  
          println("Hello,") // main thread continues here immediately
      }
  }
  
  suspend fun anotherMethod (outer: Int,index: Int){
      println("inner-b4----" + outer + "--" + index)
      delay(3000L)
      println("inner-After----" + outer + "--" + index)
  }
  </code></pre>