-
Notifications
You must be signed in to change notification settings - Fork 57
add thread naming utilities #213
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
base: rolling
Are you sure you want to change the base?
Conversation
Signed-off-by: Adam Aposhian <adam.aposhian@fireflyautomatix.com>
src/thread_name.cpp
Outdated
|
||
// This includes the null terminator | ||
#if defined(__APPLE__) | ||
constexpr size_t MAXTHREADNAMESIZE = 64; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
include <cstddef>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- add include for size_t
src/thread_name.cpp
Outdated
std::error_code error_code(result, std::system_category()); | ||
throw std::system_error(error_code, "Failed to get thread name"); | ||
} | ||
std::wstringstream wss; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
include <sstream>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is included, but only on windows.
|
||
std::string get_thread_name() | ||
{ | ||
std::string name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
include <string>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- add string include to cpp
Signed-off-by: Adam Aposhian <adam.aposhian@fireflyautomatix.com>
Signed-off-by: Adam Aposhian <adam.aposhian@fireflyautomatix.com>
Signed-off-by: Adam Aposhian <adam.aposhian@fireflyautomatix.com>
230621f
to
2a2a955
Compare
Signed-off-by: Adam Aposhian <adam.aposhian@fireflyautomatix.com>
I finally got my Windows development environment up, so I was able to test, and now this compiles and tests pass on Windows. I have still not tested on Apple |
Description
Moved thread naming utilities from ros2/rclcpp#2871.
Fixes ros2/rclcpp#2818
Is this user-facing behavior change?
No, just new interfaces.
Did you use Generative AI?
Yes. Cursor autocomplete.
Additional Information