This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Threads and Synchronization and the fly likes ThreadPools and monitoring 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 "ThreadPools and monitoring" Watch "ThreadPools and monitoring" New topic
Author

ThreadPools and monitoring

Anthony Smith
Ranch Hand

Joined: Sep 10, 2001
Posts: 285
There have been many discussions about this. I have implemented the Jakarta Common threadpool and it works, but I now need more options.

ThreadPool threadPool = new DefaultThreadPool(3);

while ( i != 5){
threadPool.invokeLater(new MyObject); // This will call the run method
}

public void run(){
//do something....
}

*******************
Other notes about my code:
1) My class implements Runnable



My questions:
2) How can my code tell when the threads have all finished executing?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ThreadPools and monitoring
 
Similar Threads
K&B Maste Exam Question on classpath
How can I determine when my Threads are complete?
How to kill runnig thread using java?(not waiting)
Using ExecutorService instead of regular Threads
ThreadPool with different tasks