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 ThreadPools and monitoring Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android 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
How to kill runnig thread using java?(not waiting)
K&B Maste Exam Question on classpath
How can I determine when my Threads are complete?
ThreadPool with different tasks
Using ExecutorService instead of regular Threads