Skip to content

Commit

Permalink
addressed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaschke committed Sep 9, 2016
1 parent 0dc06b2 commit 835579f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions clients/roscpp/include/ros/spinner.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,11 @@ class ROSCPP_DECL AsyncSpinner
* \brief Check if the spinner can be started. The spinner shouldn't be started if
* another single-threaded spinner is already operating on the callback queue.
*
* This function is not necessary anymore. start() will always start spinning.
* This function is not necessary anymore. start() will always try to start spinning
* and throw a std::runtime_error if it failed.
*/
ROS_DEPRECATED bool canStart();
// TODO: deprecate in L-turtle
bool canStart();
/**
* \brief Start this spinner spinning asynchronously
*/
Expand Down
4 changes: 2 additions & 2 deletions clients/roscpp/src/libros/spinner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ namespace {
struct SpinnerMonitor
{
/* store spinner information per callback queue:
Only as unique single-threaded spinner is allowed and we store its thread id.
Only one unique single-threaded spinner is allowed and we store its thread id.
As multiple multi-threaded spinners are allowed in parallel, their number is counted.
*/
struct Entry
{
Entry(const boost::thread::id &tid) : tid(tid) {}
Entry(const boost::thread::id &tid) : tid(tid), num_multi_threaded(0) {}

boost::thread::id tid; // thread id of single-threaded spinner
unsigned int num_multi_threaded; // number of multi-threaded spinners
Expand Down

0 comments on commit 835579f

Please sign in to comment.