This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Thread pool

 
Mike Nightsky
Ranch Hand
Posts: 48
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Has anybody experience with Threadpools or a good example of an working one?
Thanks in advance.
Mike
 
Alex Zhang
Ranch Hand
Posts: 68
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic