Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to fix the size of the ThreadPool in an Application ??

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I am thinking of using a ThreadPool for my Application as to increase the performance , but how could we fix the size of the Threads inside
ThreadPool .

What do you suggest on this ??

Thanks for reading .
 
Henry Wong
author
Marshal
Pie
Posts: 21114
78
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

It depends on the thread pool class that you are using -- for example, with the ThreadPoolExecutor class, you can fix it by setting the core and max thread size to be the same during construction.

Henry
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks , i will look into the details you mentioned and ask you some more queries on this .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic