-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit by wunderbar wunderkind constant contributor @Heliotrop3 optimizes the implementation of our strong LRU cache to internally leverage an efficient non-reentrant `threading.Lock` primitive in place of the prior inefficient reentrant `threading.RLock` primitive. Specifically, this commit: * Changes the locking mechanism used to ensure thread saftey from `RLock` to `Lock`. * Streamlines the commentary around the strong LRU cache, its methods, and its test cases. * Corrects the `LRUCacheStrong.__init__()` method docstring with respect to exception types raised by this method. ## Features Optimized * **Strong LRU cache threading primitives.** The private `beartype._util.cache.utilcachelru.LRUCacheStrong` class has now been optimized to internally leverage an efficient non-reentrant `threading.Lock` primitive in place of the prior inefficient reentrant `threading.RLock` primitive. Thanks for all the munificent magnificence, @Heliotrop3! (*Magenta magpies!*)
- Loading branch information
1 parent
7bd1593
commit 99225ee
Showing
2 changed files
with
159 additions
and
264 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
Oops, something went wrong.