Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Await.result does not block example #9

Open
@phufool

Description

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)

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions