Refaactoring-Thread Interrupt (#3412)
This commit is contained in:
parent
0a343e10cb
commit
5b8e84b26c
@ -43,8 +43,9 @@ public class ControlSubThread implements Runnable {
|
||||
try {
|
||||
Thread.sleep(interval);
|
||||
} catch (InterruptedException e) {
|
||||
// no-op, just loop again
|
||||
}
|
||||
Thread.currentThread().interrupt();
|
||||
System.out.println("Thread was interrupted, Failed to complete operation");
|
||||
}
|
||||
// do something
|
||||
}
|
||||
stopped.set(true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user