From 69c4eb1be61e079580dd4cf55ae4aedadd1e07aa Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Sat, 1 Sep 2012 15:14:33 +0200 Subject: [PATCH] LogDialog: Try not to block for 20 seconds on closing Signed-off-by: Sven Strickroth --- src/TortoiseProc/GitLogListBase.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/TortoiseProc/GitLogListBase.cpp b/src/TortoiseProc/GitLogListBase.cpp index 3885cbcdb..30e36d9d1 100644 --- a/src/TortoiseProc/GitLogListBase.cpp +++ b/src/TortoiseProc/GitLogListBase.cpp @@ -2411,7 +2411,7 @@ UINT CGitLogListBase::LogThread() t2=t1=GetTickCount(); int oldprecentage = 0; size_t oldsize = m_logEntries.size(); - while( ret== 0) + while (ret== 0 && !m_bExitThread) { g_Git.m_critGitDllSec.Lock(); try @@ -2510,6 +2510,12 @@ UINT CGitLogListBase::LogThread() } + if (m_bExitThread) + { + InterlockedExchange(&m_bThreadRunning, FALSE); + return 0; + } + // restore last selected item if (lastSelectedHashNItem >= 0) { -- 2.11.4.GIT