run exit sequences in parallel

This commit is contained in:
fdev31 2023-04-28 00:54:08 +02:00
parent 253ffba724
commit ba2fa1a51c

View file

@ -96,8 +96,7 @@ class Pyprland:
async with self.server: async with self.server:
await self.server.serve_forever() await self.server.serve_forever()
finally: finally:
for plugin in self.plugins.values(): await asyncio.gather(*(plugin.exit() for plugin in self.plugins.values()))
await plugin.exit()
async def run(self): async def run(self):
await asyncio.gather( await asyncio.gather(