i have a problem, i create an aribrary number of threads in a for loop wich i want to run cuncurrently, but i need to wait for all of them to be finished executing before i can continue... anyone know if this is possible??
Code:
Sum thesum = new Sum(N);
for(int i=0; i<N; i++){
childProcess thread = new childProcess(N, i, darray[i], thesum);
thread.start();
}
//WHAT CAN I PUT HERE?
thesum.print();