«« Next » « Previous
«« Next » « Previous

Link Details

If you don't vote, who will? Login and vote now.
Link 90427 thumbnail

By harris goldstone
via java.dzone.com
Published: Jun 26 2008 / 08:03

Jakob continues his concurrency series with a new installment, about thread pools: "Thread Pools are useful when you need to limit the number of threads running in your application at the same time. There is a performance overhead associated with starting a new thread, and each thread is also allocated some memory for its stack etc."
  • 13
  • 0
  • 1205
  • 423

Comments

Add your comment
User 266646 avatar

climber76 replied ago:

0 votes Vote down Vote up Reply

Hi all,
Why don't you use ScheduledThreadPoolExecutor (http://java.sun.com/javase/6/docs/api/java/util/concurrent/ScheduledThreadPoolExecutor.html)? I think it is a valid alternative to homemade thread pool managers.

User 131196 avatar

Jakob Jenkov replied ago:

0 votes Vote down Vote up Reply

It is. The text also mentions that Java 5 comes with built in thread pools. The text (and the tutorial in general) merely serves as explanation of the basic theoretic issues in Java Concurrency. Once you understand the basics it is easier to understand concurrency in general, and easier to use the built-in concurrency utilities (in my opinion).

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.