diff --git a/src/textual/widgets/_tabbed_content.py b/src/textual/widgets/_tabbed_content.py index 04806506a6..827e0a9ba7 100644 --- a/src/textual/widgets/_tabbed_content.py +++ b/src/textual/widgets/_tabbed_content.py @@ -1,5 +1,6 @@ from __future__ import annotations +from asyncio import gather from itertools import zip_longest from typing import Generator @@ -87,8 +88,7 @@ def __init__(self, *awaitables: AwaitMount | AwaitRemove) -> None: def __await__(self) -> Generator[None, None, None]: async def await_tabbed_content() -> None: - for awaitable in self._awaitables: - await awaitable + await gather(*self._awaitables) return await_tabbed_content().__await__()