Skip to content

Commit

Permalink
refactor: add ExtensionController.stop_all()
Browse files Browse the repository at this point in the history
  • Loading branch information
friday committed May 6, 2024
1 parent 13546ce commit 884b24d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ulauncher/modes/extensions/ExtensionController.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,3 +255,8 @@ async def stop(self) -> None:
if runtime:
await runtime.stop()
self.is_running = False

@classmethod
async def stop_all(cls) -> None:
jobs = [c.stop() for c in controller_cache.values() if c.is_running]
await asyncio.gather(*jobs)

0 comments on commit 884b24d

Please sign in to comment.