1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2023 - TortoiseGit
4 // External Cache Copyright (C) 2005 - 2006 - Will Dean, Stefan Kueng
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software Foundation,
18 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 #include "SmartHandle.h"
27 * Handles notifications to the shell about status changes. This is done
28 * in a separate thread to avoid deadlocks.
38 void AddPathForUpdate(const CTGitPath
& path
);
42 static unsigned int __stdcall
ThreadEntry(void* pContext
);
46 CComAutoCriticalSection m_critSec
;
47 CAutoGeneralHandle m_hThread
;
48 std::deque
<CTGitPath
> m_pathsToUpdate
;
49 CAutoGeneralHandle m_hTerminationEvent
;
50 CAutoGeneralHandle m_hWakeEvent
;
52 volatile bool m_bItemsAddedSinceLastUpdate
= false;
53 volatile LONG m_bRunning
= FALSE
;