Skip to content

Commit

Permalink
Fix LoadComposableNodes action so that loading happens asynchronously (
Browse files Browse the repository at this point in the history
…#113)

Fixes #107.

Before, the first call to _load_in_sequence was not asynchronous, unlike it's recursive calls.
This change makes the first call asynchronous.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
  • Loading branch information
jacobperron committed Mar 12, 2020
1 parent 88400a0 commit a29fc49
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions launch_ros/launch_ros/actions/load_composable_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,5 +167,9 @@ def execute(
self.__target_container.node_name
)
)
# Assume user has configured `LoadComposableNodes` to happen after container action
self._load_in_sequence(self.__composable_node_descriptions, context)

context.add_completion_future(
context.asyncio_loop.run_in_executor(
None, self._load_in_sequence, self.__composable_node_descriptions, context
)
)

0 comments on commit a29fc49

Please sign in to comment.