Scala notes - Futures - 3 (Combinators and Async)

In the previous parts of this post, we discussed about Futures [https://www.arunma.com/2016/05/29/scala-notes-futures-1/] and Promises [https://www.arunma.com/2016/06/05/scala-notes-futures-2-promises/]. In this last part, we'll compose Futures using its powerful combinators. Composing Futures : In the first post [https://www.arunma.com/…

Scala notes - Futures - 2 (Promises)

In the last post, we saw how to extract values from the Future upon onComplete and their counterparts - onSuccess and onFailure. We also saw how to use Await.result in Testcases to block and get the value from Future. In this post, we'll discuss briefly about the relationship between…

Scala Notes - Futures - 1

Almost all modern programming languages have a Future-Promise idiom for concurrent programming. I don't intend to bore you with why we need higher level of concurrency abstractions. Instead, in this post, we'll cut to the chase and discuss only about Scala's approach to Futures. A scala.concurrent.Future is a…

What does java.util.concurrent.Future hold?

Let's be sure of what the Future holds Future, which is a part of the Java concurrency Task execution framework, is the result of your computation as the javadoc [http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/Future.html] claims. And more. When you are executing a…

Callable vs Runnable - The brawl of the runners

Runnable : I am the Yoda of multithreading. For generations, I was the only way (other than lang.Thread) that people could do parallel activities in Java. Remember the cool method that I have - run. Too bad, it returns a void though. Callable : I am a Runnable, just better and…