The solution I'm using now is slightly cludgy, with each of the entities reporting back to the model when they're finished and the model doing something like this:
@Override
public synchronized void done() {
runningNodes--;
if(runningNodes == 0) {
ParallelEventSystem.mayFinish();
}
}
. This seems to work pretty well. If I wanted to I could even put the print of the time it took in this function, it would probably be more accurate. I'll try that next.
Geen opmerkingen:
Een reactie posten