You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.
I've not this problem but something more weird
In my case the future on the read never complete
Why this
This is the code
val write : Future[Unit] = set.put("2", cacheData)
val read : Future[Option[CacheData]] = set.get("2")
val future = write flatMap(_ => read)
future onComplete {
case Success(data) => println("Get Object" + data.getOrElse("empty"))
case Failure(ex) => ex.printStackTrace()
}
Thread.sleep(10000)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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)
The text was updated successfully, but these errors were encountered: