HTML5 Canvas
Written by: Simon Sarris
Featured Refcardz: Top Refcardz:
  1. Apache Hadoop
  2. Web Driver
  3. MVVM
  4. REST
  5. ADO.NET
  1. HTML5
  2. Ajax
  3. jQuery Selectors
  4. CSS Part 1
  5. Git

Link Details

Link 134379 thumbnail
User 313906 avatar

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.
  • 23
  • 2
  • 6521
  • 117

Comments

Add your comment
User 207620 avatar

tgautier replied ago:

0 votes Vote down Vote up Reply

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.

User 314621 avatar

java2jee.blogspot.com replied ago:

0 votes Vote down Vote up Reply

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!

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.