Skip to content

Commit 188bc26

Browse files
committed
fix jdoc
1 parent cb17ebf commit 188bc26

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ You need to add next dependencies:
2121
<dependency>
2222
<groupId>com.github.antkorwin</groupId>
2323
<artifactId>xsync</artifactId>
24-
<version>0.4</version>
24+
<version>0.5</version>
2525
</dependency>
2626
```
2727

src/main/java/com/antkorwin/xsync/XSync.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,16 @@ public void execute(KeyT mutexKey, Runnable runnable) {
2525
}
2626
}
2727

28-
28+
/**
29+
* Evaluate a supplier in a synchronization block on a mutex,
30+
* which created from the mutexKey value.
31+
*
32+
* @param mutexKey key for the synchronization locks
33+
* @param supplier function that we need to run in sync. block
34+
* @param <ResultT> type of tht result of a supplier
35+
*
36+
* @return result which return by a supplier
37+
*/
2938
public <ResultT> ResultT evaluate(KeyT mutexKey, Supplier<ResultT> supplier) {
3039
XMutex<KeyT> mutex = mutexFactory.getMutex(mutexKey);
3140
synchronized (mutex) {

0 commit comments

Comments
 (0)