title: Android - Kotlin : return value in async fun
body: <p>I would like to ask if it's possible to 'return' a value from a function
  if the function doing AsyncTask? </p>
  
  <p>For example : </p>
  
  <pre><code>fun readData() : Int{
      val num = 1;
      doAsync { 
      for (item in 1..1000000){
          num += 1;
      }
      }
      return num;
  }
  </code></pre>
  
  <p>The problem in this function is that the AsyncTask is not finish yet so i get a wrong value from the function ,any idea how to solve it?</p>
  
  <p>is using a interface is the only why or there is a compilation handler like in Swift ?</p>