Skip to content
This repository was archived by the owner on May 31, 2025. It is now read-only.

roscpp: Adding AsyncSpinner::canStart to check if a spinner can be started - #377

Closed
jbohren wants to merge 1 commit into
ros:indigo-develfrom
jhu-lcsr-forks:async-spinner-can-start
Closed

jbohren wants to merge 1 commit into
ros:indigo-develfrom
jhu-lcsr-forks:async-spinner-can-start

Conversation

@jbohren

@jbohren jbohren commented Mar 11, 2014

Copy link
Copy Markdown
Member

This adds the introspection described in #277

Should a PR also be made against hydro?

Comment thread clients/roscpp/src/libros/spinner.cpp Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please simplify the code:

return spinlock.owns_lock();

@jbohren

jbohren commented Mar 11, 2014

Copy link
Copy Markdown
Member Author

Corrections made.

@tfoote

tfoote commented Mar 11, 2014

Copy link
Copy Markdown
Member

+1

Comment thread clients/roscpp/src/libros/spinner.cpp Outdated

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This error message actually can't be this precise. It's possible that the other AsyncSpinner was created with a non-default callback queue, so not even the default queue will be serviced.

@jbohren

jbohren commented Mar 11, 2014

Copy link
Copy Markdown
Member Author

I've updated the warning message to better characterize the issue with starting two AsyncSpinners.

@dirk-thomas

Copy link
Copy Markdown
Member

+1 Manually merged in e6f48a8 with a minor whitespace change.

@dirk-thomas

Copy link
Copy Markdown
Member

I will cherry-pick the change to the hydro-devel branch once it passed CI - you don't have to create a PR for that.

@jbohren

jbohren commented Mar 11, 2014

Copy link
Copy Markdown
Member Author

I will cherry-pick the change to the hydro-devel branch once it passed CI - you don't have to create a PR for that.

Cool. Thanks, Dirk.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants