Skip to content
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

Always set thread names on POSIX platforms #3384

Merged
merged 2 commits into from
Jul 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,10 @@ cmake-build/
*.bak
stage/
releases/

# vim #
#######
*.orig
*.swp
*.vim
tags
8 changes: 0 additions & 8 deletions Foundation/src/Thread_POSIX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ namespace
#endif


#if defined(POCO_POSIX_DEBUGGER_THREAD_NAMES)


namespace {
void setThreadName(pthread_t thread, const std::string& threadName)
{
Expand All @@ -83,9 +80,6 @@ void setThreadName(pthread_t thread, const std::string& threadName)
}


#endif


namespace Poco {


Expand Down Expand Up @@ -357,9 +351,7 @@ void* ThreadImpl::runnableEntry(void* pThread)
#endif

ThreadImpl* pThreadImpl = reinterpret_cast<ThreadImpl*>(pThread);
#if defined(POCO_POSIX_DEBUGGER_THREAD_NAMES)
setThreadName(pThreadImpl->_pData->thread, reinterpret_cast<Thread*>(pThread)->getName());
#endif
AutoPtr<ThreadData> pData = pThreadImpl->_pData;
try
{
Expand Down