• Post Reply Bookmark Topic Watch Topic
  • New Topic

need help in using concurrent package  RSS feed

 
anita sam
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am new to this package. i need some code examples using queuedexecutor so that i can understand it more clearly. can anyone help me regarding this. thanks in advance.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've only used the JDK 5 stuff, but assuming it's pretty similar, here's how simple it can be:

This loop puts a command into the threadpool queue for every new client connection to my Wiki server. This particular pool will create as many concurrent threads as it needs and reuse them later.
 
anita sam
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Stan
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!