-
Notifications
You must be signed in to change notification settings - Fork 912
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
fix multi-threaded spinning #867
Commits on Sep 9, 2016
-
replace global spinmutex with SpinnerMonitor
Using a single recursive mutex disables to run several spinners in parallel (started from different threads) - even if they operate on different callback queues. The SpinnerMonitor keeps a list of spinning callback queues, thus making the monitoring local to callback queues.
Configuration menu - View commit details
-
Copy full SHA for e1d4e2e - Browse repository at this point
Copy the full SHA e1d4e2eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 410b982 - Browse repository at this point
Copy the full SHA 410b982View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8c7e7a8 - Browse repository at this point
Copy the full SHA 8c7e7a8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 45b9aba - Browse repository at this point
Copy the full SHA 45b9abaView commit details -
throw a std::run_time exception when spinner couldn't be started
This correctly indicates the fatality of the error but allows for graceful quitting too.
Configuration menu - View commit details
-
Copy full SHA for e46d81d - Browse repository at this point
Copy the full SHA e46d81dView commit details -
activate unittest for spinners
- moved test/test_roscpp/test/test_spinners.cpp -> test/test_roscpp/test/src/spinners.cpp - created rostest test/test_roscpp/test/launch/spinners.xml - use thrown exception to evaluate error conditions
Configuration menu - View commit details
-
Copy full SHA for e7f8c4b - Browse repository at this point
Copy the full SHA e7f8c4bView commit details -
correctly count number of started multi-threaded spinners
fixes unittest Spinners.async
Configuration menu - View commit details
-
Copy full SHA for 0dc06b2 - Browse repository at this point
Copy the full SHA 0dc06b2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 835579f - Browse repository at this point
Copy the full SHA 835579fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 14700b4 - Browse repository at this point
Copy the full SHA 14700b4View commit details
Commits on Sep 15, 2016
-
Configuration menu - View commit details
-
Copy full SHA for 9e71906 - Browse repository at this point
Copy the full SHA 9e71906View commit details -
Configuration menu - View commit details
-
Copy full SHA for 34e84df - Browse repository at this point
Copy the full SHA 34e84dfView commit details -
Configuration menu - View commit details
-
Copy full SHA for a0c78a0 - Browse repository at this point
Copy the full SHA a0c78a0View commit details
Commits on Sep 17, 2016
-
code simplification + improved comments
Allow multiple single-threaded spinners (in same thread) and count their number. Thus single-threaded and multi-threaded spinners are handled similarly.
Configuration menu - View commit details
-
Copy full SHA for a05d5a2 - Browse repository at this point
Copy the full SHA a05d5a2View commit details -
rollback strict error checking for backwards compatibility
Previously, we could have the following situations: 1. `S1` (single-threaded spinner started in `thread 1`): will block `thread 1` until shutdown. Any further spinners in different threads were not allowed (with an error message). 2. `M1` (multi-threaded spinner started in `thread 1`): Further spinners started from _different_ threads were not allowed (with an error message). 3. `M1 ... M1 S1` (multi-threaded spinners started in `thread 1` and afterwards a single-threaded one started): This was accepted without any errors. But the new behavior is to reject `S1`! Restrictions of case 1 + 2 are relaxed with this PR: Other spinners are allowed as long as the operate on a different queue. Thread doesn't matter. The tricky part is case 3, which - although nonsense - was perfectly valid code before. In order to maintain the old behavior, I need to remember, which thread the first M-spinner was started in, using the new variable `initial_tid`. * allow spinning of a single-threaded spinner after some multi-threaded ones, as long as they are started from the same thread * don't throw exceptions * disabled corresponding unittests
Configuration menu - View commit details
-
Copy full SHA for 91be0e5 - Browse repository at this point
Copy the full SHA 91be0e5View commit details