fix potential cancelling race with full queue

This commit is contained in:
Sarah Hoffmann
2026-02-12 17:18:48 +01:00
parent 29fcd0b763
commit aa42dc8a93

View File

@@ -38,6 +38,7 @@ class QueryPool:
""" Schedule a query for execution.
"""
if self.is_cancelled:
self.clear_queue()
await self.finish()
return
@@ -47,6 +48,7 @@ class QueryPool:
await asyncio.sleep(0)
if self.is_cancelled:
self.clear_queue()
await self.finish()
async def finish(self) -> None: