public static int calculateHorsesFinished(List<Horse> horses) throws InterruptedException { int finishedCount = 0; for (Horse hors : horses) { if(hors.isFinished()) finishedCount++; else if(!(hors.isFinished())) { System.out.println("Waiting for " + hors.getName()); hors.join(); //почему на неё?! } } return finishedCount; }