public void run( { try { for (int = 1; i <= REPETITIONS && !isInterrupted(); i++) { //do the work } } catch (InterruptedException exception) { } //cleanup }