By pbielicki
via java2jee.blogspot.com
Published: Nov 17 2008 / 06:05
In this part of the Java concurrency tutorial I'm presenting differences between Runnable and Callable interfaces as well as when and how to use Future interface and FutureTask class. As a side-effect of this "lesson" I'm presenting how to use ExecutorService.
I'm presenting all of this on a real example where I "parallelize" a sequential algorithm in order to utilize more resources and to get better performance.



Comments
tgautier replied ago:
Grrr....what to vote. A decent little article on futures, callables and runnables, except the code is broken. Even after an astute reader pointed out the brokenness in the Runnable example, it's *still* broken.
java2jee.blogspot.com replied ago:
yeah! Runnable code is not borken - it is to be fixed by the readers ;) just like I wrote in my reply.
and you know, you can make couple of mistakes even in "Hello World" program, thus beg my pardon fogetting one little final word (well pretty much important but very little)
cheers!
Voters For This Link (23)
Voters Against This Link (2)