wcarlson5 commented on a change in pull request #9863:
URL: https://github.com/apache/kafka/pull/9863#discussion_r562929843



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java
##########
@@ -612,11 +612,22 @@ public void setStreamsUncaughtExceptionHandler(final 
java.util.function.Consumer
 
     public void waitOnThreadState(final StreamThread.State targetState) {
         synchronized (stateLock) {
-            while (state != targetState) {
-                try {
-                    stateLock.wait();
-                } catch (final InterruptedException e) {
-                    // it is ok: just move on to the next iteration
+            boolean interrupted = false;
+            try {
+                while (state != targetState) {
+                    try {
+                        stateLock.wait();

Review comment:
       That is a fair concern. Based on the interrupt documentation I would 
hope that force quit doesn't use the interrupt path. As Bruno said 
   
   > In the words of "Java Concurrency in Practice":
   "Thread interruption is a cooperative mechanism for a thread to signal 
another thread that it should, at its convenience and if it feels like it, stop 
what it is doing and do something else."
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to