The thread doesn't have to be sleeping to get interrupted. It is enough for the
interrupt flag to be set via `processingTimeUpdateThread.interrupt();` for the
thread to throw an `InterruptedException` the next time it attempts to sleep.
You can test that easily, e.g.
```java
new Thread(new Runnable() {
@Override
public void run() {
Thread.currentThread().interrupt();
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
System.out.println("interrupted");
}
}
}).start();
```
[ Full content available at: https://github.com/apache/beam/pull/6385 ]
This message was relayed via gitbox.apache.org for [email protected]