title: Using futures and Thread.sleep
body: <p>By executing this scala code, I don't have any output in the console. (I don't really understand what is happening)</p>
  
  <p>If I remove <code>Console.println("Console.println OK!")</code> => everything seems fine.</p>
  
  <p>If I remove <code>Thread.sleep(2000)</code> => everything seems fine.</p>
  
  <p>Do you have any ideas about this ? Thank you very much!</p>
  
  <p>Clément</p>
  
  <pre><code>import scala.concurrent.ExecutionContext.Implicits.global
  import scala.concurrent.duration._
  import scala.concurrent.{Await, Future}
  import scala.language.postfixOps
  
  object ScalaFuture {
  
    def main(args: Array[String]) {
  
      val f: Future[String] = Future {
        Thread.sleep(2000)
        "future value"
      }
  
      f.onSuccess {
        case s =&gt; {
          Console.println("Console.println OK!")
          System.out.println("System.out.println OK!")
        }
      }
  
      Await.ready(f, 60 seconds)
    }
  
  }
  </code></pre>