Skip to content

Commit

Permalink
Fixes runlevel concurrency issue
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
  • Loading branch information
jbescos committed Jan 29, 2024
1 parent 07a0607 commit f4e4059
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1410,7 +1410,7 @@ private DownQueueRunner(ReentrantLock queueLock,
@Override
public void run() {
for (;;) {
ActiveDescriptor<?> job = null;
ActiveDescriptor<?> job;
queueLock.lock();
try {
if (caput) return;
Expand All @@ -1419,15 +1419,14 @@ public void run() {
queueCondition.signal();
return;
}
job = queue.remove(0);
job = queue.get(0);
} finally {
queueLock.unlock();
}

try {
locator.getServiceHandle(job).destroy();
}
catch (Throwable th) {
} catch (Throwable th) {
queueLock.lock();
try {
parent.lastError = th;
Expand All @@ -1436,6 +1435,13 @@ public void run() {
} finally {
queueLock.unlock();
}
} finally {
queueLock.lock();
try {
queue.remove(job);
} finally {
queueLock.unlock();
}
}
}

Expand Down

0 comments on commit f4e4059

Please sign in to comment.