launch.actions.opaque_coroutine module
Module for the OpaqueCoroutine action.
- class launch.actions.opaque_coroutine.OpaqueCoroutine[source]
Bases:
Action
Action that adds a Python coroutine function to the launch run loop.
The signature of the coroutine function should be:
async def coroutine_func( context: LaunchContext, *args, **kwargs ): ...
if ignore_context is False on construction (currently the default), or
async def coroutine_func( *args, **kwargs ): ...
if ignore_context is True on construction.
- __init__(*, coroutine: Callable[[...], Awaitable[None]], args: Iterable[Any] | None = None, kwargs: Dict[str, Any] | None = None, ignore_context: bool = False, **left_over_kwargs) None [source]
Create an OpaqueCoroutine action.
- execute(context: LaunchContext) List[LaunchDescriptionEntity] | None [source]
Execute the action.