The program creates the expected output. When trying to validate I'm running into a time out error though. ("Check your code. It looks like you have an infinite loop.") I explicitly added Thread.currentThread().interrupt(); in the catch clauses of the InterruptedExceptions in order to kind of "rethrow" the interrupt. (I also tried using boolean flags beforehand.) When sending the interrupt from the main method the program successfully stops running. I'm therefore not sure what the issue is. Any hints are much appreciated. :-) Cheers Seb