Skip to content

Commit

Permalink
changed error message for single threaded spinner (#1164)
Browse files Browse the repository at this point in the history
* not imply that spinning was successful when mixing single threaded spinner with multi/async spinners

* updated error messages to reflect behavior when calling a singlethreaded spinner alongside a multithreaded one
  • Loading branch information
jgueldenstein authored and dirk-thomas committed Feb 9, 2018
1 parent ef29394 commit b34255d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions clients/roscpp/src/libros/spinner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@
namespace {

const std::string DEFAULT_ERROR_MESSAGE =
"\nAttempt to spin a callback queue from two spinners, one of them being single-threaded."
"\nThis will probably result in callbacks being executed out-of-order."
"\nIn future this will throw an exception!";
"Attempt to spin a callback queue from two spinners, one of them being single-threaded."
"\nIn the future this will throw an exception!";

/** class to monitor running single-threaded spinners.
*
Expand Down Expand Up @@ -150,7 +149,7 @@ void SingleThreadedSpinner::spin(CallbackQueue* queue)

if (!spinner_monitor.add(queue, true))
{
ROS_ERROR_STREAM("SingleThreadedSpinner: " << DEFAULT_ERROR_MESSAGE);
ROS_ERROR_STREAM("SingleThreadedSpinner: " << DEFAULT_ERROR_MESSAGE + " You might want to use a MultiThreadedSpinner instead.");
return;
}

Expand Down

0 comments on commit b34255d

Please sign in to comment.