Bug fix, Lock 64/3964/1
authorPatrikBuhr <patrik.buhr@est.tech>
Wed, 3 Jun 2020 09:59:00 +0000 (11:59 +0200)
committerPatrikBuhr <patrik.buhr@est.tech>
Wed, 3 Jun 2020 10:01:19 +0000 (12:01 +0200)
When a pending lock is added to the queue (for pending locks),
the lock may already be released.
In that case, no notifyAll() will be called.

Change-Id: I4d63d5656b09ab0cb9d5f242c9abf9d708fb1a9b
Issue-ID: NONRTRIC-195
Signed-off-by: PatrikBuhr <patrik.buhr@est.tech>
policy-agent/src/main/java/org/oransc/policyagent/repository/Lock.java

index ed94492..a19870b 100644 (file)
@@ -167,6 +167,7 @@ public class Lock {
 
     private synchronized void addToQueue(MonoSink<Lock> callback, LockType lockType) {
         lockRequestQueue.add(new LockRequest(callback, lockType, this));
+        processQueuedEntries();
     }
 
     @SuppressWarnings("java:S2274") // Always invoke wait() and await() methods inside a loop