Reduce interface stutters when the nearest placeholder is far away.

- Achieved by making the placeholder generator asynchronous.
This commit is contained in:
Andrew Hamilton 2018-08-16 22:18:21 +10:00
parent 48fc34c632
commit 2c402a683a
2 changed files with 7 additions and 6 deletions

View file

@ -44,8 +44,8 @@ class Worker:
await jobs_added_event.wait()
while True:
try:
self.result = summary.get_closest_placeholder()
except StopIteration:
self.result = await summary.get_closest_placeholder()
except StopAsyncIteration:
self.result = None
if summary.result_total == summary.completed_total:
log.log_message("All results are up to date.")