mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Oops, forgot to move test for lock failure above cache access
This commit is contained in:
parent
5ff45a7ee7
commit
dc88a74caa
@ -2235,7 +2235,6 @@ class Cache(object):
|
||||
# the cache and that recursive calls don't do the update. This
|
||||
# method can recurse via self._search()
|
||||
with try_lock(self.vls_cache_lock) as got_lock:
|
||||
if self.vls_for_books_cache is None:
|
||||
# Using a list is slightly faster than a set.
|
||||
c = defaultdict(list)
|
||||
if not got_lock:
|
||||
@ -2247,6 +2246,7 @@ class Cache(object):
|
||||
# VL then the eventual answer will be correct because get_metadata
|
||||
# will clear the caches.
|
||||
return c
|
||||
if self.vls_for_books_cache is None:
|
||||
self.vls_for_books_cache_is_loading = True
|
||||
libraries = self._pref('virtual_libraries', {})
|
||||
for lib, expr in libraries.items():
|
||||
|
Loading…
x
Reference in New Issue
Block a user