mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Make the snippet search thread yield after every result so other threads can be scheduled
This commit is contained in:
parent
8e655fda1c
commit
54c5411d6e
@ -252,7 +252,7 @@ class ResultsModel(QAbstractItemModel):
|
||||
db = get_db()
|
||||
generator = db.fts_search(*a, **kw, result_type=lambda x: x)
|
||||
for result in generator:
|
||||
if abort.is_set():
|
||||
if abort.wait(0.01):
|
||||
with suppress(StopIteration):
|
||||
generator.send(True)
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user