aspose file tools*
The moose likes Threads and Synchronization and the fly likes How to  fix the size of the ThreadPool in an Application ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "How to  fix the size of the ThreadPool in an Application ??" Watch "How to  fix the size of the ThreadPool in an Application ??" New topic
Author

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

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

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 .


Save India From Corruption - Anna Hazare.
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18717
    
  40


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


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Thanks , i will look into the details you mentioned and ask you some more queries on this .
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to fix the size of the ThreadPool in an Application ??