Scala, Concurrency, API, Project Loom, Java.
Response(user.resultNow(), order.resultNow()); } The Scala equivalent, the design of which we’re exploring here, has the following form: scoped { val user: Fork[String] = fork(findUser()) val order: Fork[Integer] = fork(fetchOrder()) Response(user.join(), order.join()) } Let’s examine this in more