Skip to content

Commit

Permalink
Prefer thread_local over APR
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-webb committed Jul 22, 2024
1 parent 7593979 commit 76de222
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/cpp/threadspecificdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#if !defined(LOG4CXX)
#define LOG4CXX 1
#endif
#include <log4cxx/private/log4cxx_private.h>
#include <log4cxx/helpers/aprinitializer.h>
#include <sstream>
#include <algorithm>
Expand Down Expand Up @@ -147,7 +148,7 @@ ThreadSpecificData* ThreadSpecificData::getCurrentData()

void ThreadSpecificData::recycle()
{
#if APR_HAS_THREADS
#if !LOG4CXX_HAS_THREAD_LOCAL && APR_HAS_THREADS
if (m_priv->ndcStack.empty() && m_priv->mdcMap.empty())
{
void* pData = NULL;
Expand Down

0 comments on commit 76de222

Please sign in to comment.