Processing results for Runnable objects in the Executor framework

The Executor framework allows the execution of concurrent tasks that returns a result using the Callable and Future interfaces. The traditional concurrent programming in Java is based on Runnable objects, but this kind of object doesn't return a result.

In this recipe, you will learn how to adapt a Runnable object to simulate a Callable one, allowing a concurrent task to return a result.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.144.12