wood burning stoves 2.0
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
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "ThreadPools and monitoring" Watch "ThreadPools and monitoring" New topic

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
It's not a secret anymore!