Skip to content

Commit 1b663dc

Browse files
committed
returning value from EAM write
1 parent 99625f7 commit 1b663dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/LockExecutor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
class LockExecutor {
1414
ReadWriteLock lock;
1515

16-
void write(Runnable action) {
16+
<T> T write(Supplier<T> action) {
1717
lock.writeLock().lock();
1818
try {
19-
action.run();
19+
return action.get();
2020
} finally {
2121
lock.writeLock().unlock();
2222
}

0 commit comments

Comments
 (0)