allthingssecurity commented on code in PR #27918:
URL: https://github.com/apache/camel/pull/27918#discussion_r4291252661


##########
components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoAbstractConsumerThread.java:
##########
@@ -101,6 +101,17 @@ public void run() {
         try {
             while (keepRunning) {

Review Comment:
   Thanks, good catch. Done in 057e95c631ca: the loop now stops when the thread 
is interrupted (`while (keepRunning && 
!Thread.currentThread().isInterrupted())`), as you suggested, so an interrupt 
ends the thread again instead of making it spin. New test 
`interruptEndsTheThreadWhileTheCursorCannotBeOpened`: the first cursor breaks, 
every new cursor fails to open, the thread is interrupted; it fails on the 
previous commit (the thread is still alive 5 s after the interrupt) and passes 
now. camel-mongodb unit tests: 20 run, 0 failures.
   
   _Claude Code on behalf of allthingssecurity_



-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to