Skip to content

Commit 6a9d223

Browse files
committed
Also when holding the lock
1 parent 7dd9907 commit 6a9d223

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugin/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1994,7 +1994,7 @@ private <T, E extends Exception> T withReadLock(@NonNull SupplierWithEx<T, E> su
19941994
try (var ignored = new WithThreadName(" acquiring read lock on storage of " + CpsFlowExecution.this)) {
19951995
readWriteLock.readLock().lock();
19961996
}
1997-
try {
1997+
try (var ignored = new WithThreadName(" with read lock on storage of " + CpsFlowExecution.this)) {
19981998
return supplier.get();
19991999
} finally {
20002000
readWriteLock.readLock().unlock();
@@ -2005,7 +2005,7 @@ private <E extends Exception> void withWriteLock(@NonNull RunnableWithEx<E> runn
20052005
try (var ignored = new WithThreadName(" acquiring write lock on storage of " + CpsFlowExecution.this)) {
20062006
readWriteLock.writeLock().lock();
20072007
}
2008-
try {
2008+
try (var ignored = new WithThreadName(" with write lock on storage of " + CpsFlowExecution.this)) {
20092009
runnable.run();
20102010
} finally {
20112011
readWriteLock.writeLock().unlock();

0 commit comments

Comments
 (0)