Skip to content

Commit

Permalink
Test hypothesis
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-webb committed Dec 20, 2024
1 parent 1df1a0b commit 1d18770
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/cpp/fileappender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ void FileAppender::activateOptionsInternal(Pool& p)
}
else if (0 == _priv->bufferedSeconds)
{
ThreadUtility::instance()->removePeriodicTask(getName());
if (auto p = _priv->taskManager.lock())
p->value()->removePeriodicTask(getName());
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/cpp/filewatchdog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ void FileWatchdog::checkAndConfigure()

void FileWatchdog::start()
{
checkAndConfigure();
auto taskManager = ThreadUtility::instancePtr();
checkAndConfigure();
if (!taskManager->value().hasPeriodicTask(m_priv->taskName))
{
if (LogLog::isDebugEnabled())
Expand Down
2 changes: 2 additions & 0 deletions src/main/cpp/threadutility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ struct ThreadUtility::priv_data
{
}

#ifdef MSYS_UCRT_DOES_NOT_HANG_HERE
~priv_data()
{ stopThread(); }
#endif

ThreadStartPre start_pre{nullptr};
ThreadStarted started{nullptr};
Expand Down

0 comments on commit 1d18770

Please sign in to comment.