forked from ben-manes/caffeine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for ben-manes#1065: Make EventDispatcher an instance field
This sidesteps an edge-case wherein a JCache listener in a primary cache mutates a secondary Caffeine cache. While this is typically not a problem, if the thread that mutates the primary cache is from a ForkJoinPool, the EventDispatcher can deadlock as the calling thread may be re-used. Under this condition, the secondary cache mutation is effectively waiting on its own Future and will deadlock.
- Loading branch information
Taylor Jones
committed
Jul 11, 2023
1 parent
3dfba16
commit 17105d5
Showing
2 changed files
with
12 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters