Fix all but one workers disappearing.
- python3.8 had a backwards incompatability that broke some uses of async generators. Fixed by making the sweep generator synchronous. Hopefully the interface isn't stalled when looking for a pending status that is far away.
This commit is contained in:
parent
c20f5bbb36
commit
f5abb79e1e
1 changed files with 3 additions and 4 deletions
|
|
@ -403,21 +403,20 @@ class Summary:
|
|||
yield down_result
|
||||
yield up_result
|
||||
|
||||
async def _placeholder_sweep(self):
|
||||
def _placeholder_sweep(self):
|
||||
x, y = self.cursor_position()
|
||||
for index, result in enumerate(self._sweep_combined(x, y)):
|
||||
if index > self.result_total:
|
||||
break
|
||||
await asyncio.sleep(0)
|
||||
if result.status == tools.Status.pending:
|
||||
yield result
|
||||
|
||||
async def get_closest_placeholder(self):
|
||||
try:
|
||||
return await self.closest_placeholder_generator.asend(None)
|
||||
return self.closest_placeholder_generator.send(None)
|
||||
except AttributeError:
|
||||
self.closest_placeholder_generator = self._placeholder_sweep()
|
||||
return await self.closest_placeholder_generator.asend(None)
|
||||
return self.closest_placeholder_generator.send(None)
|
||||
|
||||
def appearance_dimensions(self):
|
||||
return self._max_path_length + 1 + Entry.MAX_WIDTH, len(self._entries)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue