Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guard against work functions within the inner while loop hanging #66

Open
joshc-slac opened this issue Nov 4, 2024 · 0 comments
Open

Comments

@joshc-slac
Copy link
Collaborator

Current Behavior

With current behavior nodes will give a meaningful BT update unless the work function hangs, need to send kill to some "thread" to guard against this

while not completion_condition() and not work_loop_timeout_timer.is_elapsed():
logger.debug(f"CALLING CAGET FROM from node ({name})")
try:
status = func(completion_condition)
except Exception as ex:
volatile_status.set_value(py_trees.common.Status.FAILURE)
logger.error(f"Work function failed, setting node ({name}) "
f"as FAILED. ({ex})")
break

This may require launching the function as a thread with timeout...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant