posted 18 years ago
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?