blocking keyword in Scala
What's the difference between Future(blocking(blockingCall())) and blocking(Future(blockingCall())) ? Both of these are defined in scala.concurrent._ I've looked at the scala docs and some other stack overflow answers but remain unclear on what the difference is. Michael Zajac blocking acts as a hint to the ExecutionContext that it contains blocking code, so that it may spawn a new thread to prevent deadlocks. This presumes the ExecutionContext can do that, but not all are made to. Let's look at each one-by-one. Future(blocking(blockingCall())) This requires an implicit ExecutionContext to