You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/03/16 13:21:59 UTC

[GitHub] [pulsar] eolivelli opened a new issue #9921: [Java client] Consumer#receive returns null in case of InterruptedException and does not reset Thread.interrupted flag

eolivelli opened a new issue #9921:
URL: https://github.com/apache/pulsar/issues/9921


   **Describe the bug**
   if you execute Consumer#receive() and thread is Interrupted the method returns a null value but it does not set Thread.currentThead().interrupt().
   This way the caller is not aware of the Interrupted status of the Thread and cannot deal with this situation appropriately.
   
   
   **Expected behavior**
   Returning null is fine, but we must set Thread.currentThread.interrupt() and also document this behaviour in the javadocs 
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui commented on issue #9921: [Java client] Consumer#receive returns null in case of InterruptedException and does not reset Thread.interrupted flag

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on issue #9921:
URL: https://github.com/apache/pulsar/issues/9921#issuecomment-1058892423


   The issue had no activity for 30 days, mark with Stale label.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli commented on issue #9921: [Java client] Consumer#receive returns null in case of InterruptedException and does not reset Thread.interrupted flag

Posted by GitBox <gi...@apache.org>.
eolivelli commented on issue #9921:
URL: https://github.com/apache/pulsar/issues/9921#issuecomment-800258080


   @merlimat this problem is related to #852  
   
   IMO we should add Thread.currentThread.interrupt() after catching InterruptedException


----------------------------------------------------------------
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:
users@infra.apache.org