This commit is contained in:
Kovid Goyal 2022-06-26 12:21:23 +05:30
parent 5b620a3615
commit d38bcc7ad0
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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