mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
5b620a3615
commit
d38bcc7ad0
@ -252,7 +252,7 @@ class ResultsModel(QAbstractItemModel):
|
|||||||
db = get_db()
|
db = get_db()
|
||||||
generator = db.fts_search(*a, **kw, result_type=lambda x: x)
|
generator = db.fts_search(*a, **kw, result_type=lambda x: x)
|
||||||
for result in generator:
|
for result in generator:
|
||||||
if abort.wait(0.01):
|
if abort.wait(0.01): # wait for some time so that other threads/processes that try to access the db can be scheduled
|
||||||
with suppress(StopIteration):
|
with suppress(StopIteration):
|
||||||
generator.send(True)
|
generator.send(True)
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user