Hacker News new | ask | show | jobs
by sbalea 2153 days ago
In Scala/Akka, you could use the ask operator and compose the resulting Futures, something like this:

  for {
    a <- aProviderActor ? gimmeA
    b <- bProviderActor ? gimmeB
    aPlusB <- adderActor ? (add, a, b)
  } yield aPlusB
1 comments

Yeah, but you're blocking the thread. It's very very easy for you to deadlock the entire system writing code like this.