I am trying the following example and the Await.result does not seem to be blocking at all. Is this intended?
val read : Future[Option[String]] = devices.get("deviceA")
read.onComplete {
case Failure(ex) => ex.printStackTrace()
case Success(value) => println("Successfully read " + value)
}
Await.result(read, 10 seconds)
I am trying the following example and the Await.result does not seem to be blocking at all. Is this intended?
val read : Future[Option[String]] = devices.get("deviceA")
read.onComplete {
case Failure(ex) => ex.printStackTrace()
case Success(value) => println("Successfully read " + value)
}
Await.result(read, 10 seconds)