changeset 7635:7a3882e6da03

LinkedBlockingDeque.tryAdvance never terminates.
author psandoz
date Thu, 14 Mar 2013 10:11:13 +0100
parents b55d7d5f66fa
children e42fc5c2911a
files src/share/classes/java/util/concurrent/LinkedBlockingDeque.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/util/concurrent/LinkedBlockingDeque.java	Thu Mar 14 09:50:06 2013 +0100
+++ b/src/share/classes/java/util/concurrent/LinkedBlockingDeque.java	Thu Mar 14 10:11:13 2013 +0100
@@ -1248,11 +1248,12 @@
                 } finally {
                     lock.unlock();
                 }
+                if (current == null)
+                    exhausted = true;
                 if (e != null) {
                     action.accept(e);
                     return true;
                 }
-                exhausted = true;
             }
             return false;
         }