It is called, change it here and see output
...
} catch (InterruptedException e) {
System.out.println(i + " interrupted");
Thread.currentThread().interrupt();
}
...
the problem is that ThreadPoolExecutor uses its own Thread to run your task and it will interrupt this thread not yours. It makes no sense to extend Thread, implement Runnable instead. If you still to use Thread then you can call MyThread.interrupt() directly from MyThread.run()