From 96902f2d8b01cfca5e8defc5fbea59603cfe3d2a Mon Sep 17 00:00:00 2001 From: Arun Chandrasekaran Date: Sat, 14 Aug 2021 21:13:31 -0500 Subject: [PATCH 1/2] chore: gitignore vim .swp files --- .gitignore | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitignore b/.gitignore index a326021e30..b334caf220 100644 --- a/.gitignore +++ b/.gitignore @@ -144,3 +144,10 @@ cmake-build/ *.bak stage/ releases/ + +# vim # +####### +*.orig +*.swp +*.vim +tags From d13fe77c0bb832a88824b55df6eb3acf876de701 Mon Sep 17 00:00:00 2001 From: Arun Chandrasekaran Date: Mon, 23 Aug 2021 20:17:45 -0500 Subject: [PATCH 2/2] feat(POSIX): Always set thread names. I'm not sure about the original intent to hide it under a DEBUG macro. Naming the threads in release mode makes it easier to see runtime application and know which thread pool uses how many threads and what their names are. Firefox, Chromium and many other apps do this on Linux. --- Foundation/src/Thread_POSIX.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Foundation/src/Thread_POSIX.cpp b/Foundation/src/Thread_POSIX.cpp index e290622167..ceab76e828 100644 --- a/Foundation/src/Thread_POSIX.cpp +++ b/Foundation/src/Thread_POSIX.cpp @@ -62,9 +62,6 @@ namespace #endif -#if defined(POCO_POSIX_DEBUGGER_THREAD_NAMES) - - namespace { void setThreadName(pthread_t thread, const std::string& threadName) { @@ -83,9 +80,6 @@ void setThreadName(pthread_t thread, const std::string& threadName) } -#endif - - namespace Poco { @@ -357,9 +351,7 @@ void* ThreadImpl::runnableEntry(void* pThread) #endif ThreadImpl* pThreadImpl = reinterpret_cast(pThread); -#if defined(POCO_POSIX_DEBUGGER_THREAD_NAMES) setThreadName(pThreadImpl->_pData->thread, reinterpret_cast(pThread)->getName()); -#endif AutoPtr pData = pThreadImpl->_pData; try {