Skip to content

Commit

Permalink
Revert "Raise user handler exception in MultiThreadedExecutor. (#984)" (
Browse files Browse the repository at this point in the history
#1017)

This reverts commit 6c0847a.

Signed-off-by: Tomoya Fujita <[email protected]>

Signed-off-by: Tomoya Fujita <[email protected]>
  • Loading branch information
fujitatomoya authored Oct 6, 2022
1 parent 7780fa1 commit e18084f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 1 addition & 7 deletions rclpy/rclpy/executors.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,6 @@ def spin_once(self, timeout_sec: float = None) -> None:
:param timeout_sec: Seconds to wait. Block forever if ``None`` or negative.
Don't wait if 0.
:raise RuntimeError: Unexpected failure.
"""
raise NotImplementedError()

Expand All @@ -322,7 +321,6 @@ def spin_once_until_future_complete(self, future: Future, timeout_sec: float = N
:param future: The executor will wait until this future is done.
:param timeout_sec: Maximum seconds to wait. Block forever if ``None`` or negative.
Don't wait if 0.
:raise RuntimeError: Unexpected failure.
"""
raise NotImplementedError()

Expand Down Expand Up @@ -765,11 +763,7 @@ def _spin_once_impl(
except ConditionReachedException:
pass
else:
def handler_wrapper(handler):
handler()
if handler.exception() is not None:
raise handler.exception()
self._executor.submit(handler_wrapper(handler))
self._executor.submit(handler)

def spin_once(self, timeout_sec: float = None) -> None:
self._spin_once_impl(timeout_sec)
Expand Down
2 changes: 1 addition & 1 deletion rclpy/rclpy/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -1752,7 +1752,7 @@ def destroy_subscription(self, subscription: Subscription) -> bool:
"""
Destroy a subscription created by the node.
:return: ``True`` if successful, ``False`` otherwise.
:return: ``True`` if succesful, ``False`` otherwise.
"""
if subscription in self._subscriptions:
self._subscriptions.remove(subscription)
Expand Down

0 comments on commit e18084f

Please sign in to comment.