title: why the main app doesn't exit when calling a timer.schedule
body: <p>In the following,it run a calcuation after delay 2 seconds, but when run the app, it never exit. What is the code blocking the app to exit?</p>
  
  <pre><code>object Test extends App{
     import scala.concurrent._
     import java.util._
     import java.util.concurrent.{ TimeUnit }
     val timer = new java.util.Timer()
     def timeoutFuture[A](v: A, delay: Long, unit: TimeUnit): Future[A] = {
      println("inner")
      val p = Promise[A]()
      println("inner")
      timer.schedule(new java.util.TimerTask {
        def run() {
          p.success(v)
        }
      }, unit.toMillis(delay))
      println("inner")
      p.future
     }
     println("begin")
     val x1=timeoutFuture[Int](1+1,2,TimeUnit.SECONDS)
     println("end")
     println("quit")
  }
  </code></pre>