Repository: lens Updated Branches: refs/heads/master 962c8880d -> a57426e4b
LENS-954 : Fix await in FairPriorityBlockingQueue#waitUntilNotEmpty() Project: http://git-wip-us.apache.org/repos/asf/lens/repo Commit: http://git-wip-us.apache.org/repos/asf/lens/commit/a57426e4 Tree: http://git-wip-us.apache.org/repos/asf/lens/tree/a57426e4 Diff: http://git-wip-us.apache.org/repos/asf/lens/diff/a57426e4 Branch: refs/heads/master Commit: a57426e4b0276e612033f773ad3a602a6bb238af Parents: 962c888 Author: Ajay Yadava <ajayyad...@apache.org> Authored: Tue Mar 1 16:37:56 2016 +0530 Committer: Amareshwari Sriramadasu <amareshw...@apache.org> Committed: Tue Mar 1 16:37:56 2016 +0530 ---------------------------------------------------------------------- .../org/apache/lens/server/util/FairPriorityBlockingQueue.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lens/blob/a57426e4/lens-server/src/main/java/org/apache/lens/server/util/FairPriorityBlockingQueue.java ---------------------------------------------------------------------- diff --git a/lens-server/src/main/java/org/apache/lens/server/util/FairPriorityBlockingQueue.java b/lens-server/src/main/java/org/apache/lens/server/util/FairPriorityBlockingQueue.java index b2ebf5b..777223e 100644 --- a/lens-server/src/main/java/org/apache/lens/server/util/FairPriorityBlockingQueue.java +++ b/lens-server/src/main/java/org/apache/lens/server/util/FairPriorityBlockingQueue.java @@ -99,7 +99,9 @@ public class FairPriorityBlockingQueue<E> { conditionalWaitLock.lock(); try { - notEmpty.await(); + while (priorityBlockingQueue.size() < 1) { + notEmpty.await(); + } } finally { conditionalWaitLock.unlock(); }