File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Threads and Synchronization and the fly likes Thread pool Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Thread pool" Watch "Thread pool" New topic
Author

Thread pool

Mike Nightsky
Ranch Hand

Joined: Aug 18, 2001
Posts: 48
Has anybody experience with Threadpools or a good example of an working one?
Thanks in advance.
Mike


Win the opportunity to make money on the Internet<br /><a href="http://sweeps.sitesell.com/minirich.html" target="_blank" rel="nofollow">http://sweeps.sitesell.com/minirich.html</a>
Alex Zhang
Ranch Hand

Joined: Apr 19, 2001
Posts: 68
I have implemented thread pool twice in two project. Do U mean U want to have coding sample?
My implementation is that once the pool is instantiated, it will itself create a cluster of threads which are available for assigning.
Threads will be assigned to the requesters in an ordered manner which can be replaced with any mechanism, some may like round robbin. here I just use it as a reference.
If the number of available threads reaches 0, I will increase the pool size by adding additional threads to it.
If U want to have detail implementation, please reply and let me send U the code.
John Harby
Greenhorn

Joined: Jan 04, 2002
Posts: 20
Doug Lea has an excellent implementation in his (open source) package -
http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Thread pool