Skip to content

Commit fc3401b

Browse files
committed
Added a note about the deadlock risk
1 parent 2ca7753 commit fc3401b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/java/org/apache/ibatis/cache/decorators/BlockingCache.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@
2424
import org.apache.ibatis.cache.CacheException;
2525

2626
/**
27-
* Simple blocking decorator
27+
* <p>Simple blocking decorator
2828
*
29-
* Simple and inefficient version of EhCache's BlockingCache decorator.
29+
* <p>Simple and inefficient version of EhCache's BlockingCache decorator.
3030
* It sets a lock over a cache key when the element is not found in cache.
3131
* This way, other threads will wait until this element is filled instead of hitting the database.
3232
*
33+
* <p>By its nature, this implementation can cause deadlock when used incorrecly.
34+
*
3335
* @author Eduardo Macarron
3436
*
3537
*/

0 commit comments

Comments
 (0)