-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
currently AdapterManager uses two kinds of synchronizations: 1) synchronized methods on the adapter manger 2) concurrent maps with computeIfAbsent if can now happen that one thread is currently inside an computeIfAbsent and calls a synchronized method, while another thread tries to flush the cache. This then leads to a deadlock as one thread currently holds the map lock while the other holds the class lock but both are required to complete. This now replaces all synchronized AdapterManager methods by non synchronized but concurrent aware variants as these are already using thread safe datastructures only. The lockup of a map for adapters is replaced by an indirection of AdapterLookup that can be constructed lock free and therefore no further blocks / requires the map lock while calling other AdapterManager methods.
- Loading branch information
Showing
1 changed file
with
44 additions
and
22 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