Reply to comment

Thanks for your reply. I kept

Thanks for your reply. I kept missing the "implicit" keyword when creating the ActorSystem. I also had to import "akka.util.duration._", and this now works great:

import akka.actor._
import akka.dispatch._
import akka.util.duration._

object Futures extends App {

  implicit val system = ActorSystem("FutureSystem")

  val future = Future {
    1 + 1
  }
  val result = Await.result(future, 1 second)
  println(result)

}

Thanks again!

Reply

The content of this field is kept private and will not be shown publicly.