title: Program never ends when use other implementation of Execution Context for Futures
body: <pre><code>import java.util.concurrent.Executors
  
  import scala.concurrent._
  import scala.util.{Failure, Success}
  import scala.concurrent.duration.DurationInt
  import scala.language.postfixOps
  
  object Test extends App {
  
    println("start")
  
    implicit val ec: ExecutionContextExecutorService = ExecutionContext.fromExecutorService(Executors.newFixedThreadPool(10))
  
    val future: Future[Unit] = Future {
      println(s"future")
      Thread.sleep(1000)
    }
  
    future.onComplete({
      case Success(x) =&gt; println("Success")
      case Failure(x) =&gt; println("Failure")
    })
  
    Await.result(future, 10 seconds)
  
    println("finish")
  
  }
  </code></pre>
  
  <p>and the ouput is:</p>
  
  <pre><code>start
  future
  finish
  Success
  </code></pre>
  
  <p>... but the program never ends</p>
  
  <p>This is happening because I am using other Execution Context implementation, when I use <code>scala.concurrent.ExecutionContext.Implicits.global</code> everything is fine.</p>
  
  <p>What am I missing?</p>