MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / DirList_TerminateIconThread

Function DirList_TerminateIconThread

src/Dlapi.c:176–198  ·  view source on GitHub ↗

============================================================================= DirList_TerminateIconThread() Terminate Icon Thread and reset multithreading control structures

Source from the content-addressed store, hash-verified

174// Terminate Icon Thread and reset multithreading control structures
175//
176BOOL DirList_TerminateIconThread(HWND hwnd)
177{
178
179 LPDLDATA lpdl = (LPVOID)GetProp(hwnd,pDirListProp);
180
181 SetEvent(lpdl->hExitThread);
182
183 //WaitForSingleObject(lpdl->hTerminatedThread,INFINITE);
184 while (WaitForSingleObject(lpdl->hTerminatedThread,0) != WAIT_OBJECT_0)
185 {
186 MSG msg;
187 if (PeekMessage(&msg,NULL,0,0,PM_REMOVE)) {
188 TranslateMessage(&msg);
189 DispatchMessage(&msg);
190 }
191 }
192
193 ResetEvent(lpdl->hExitThread);
194 SetEvent(lpdl->hTerminatedThread);
195
196 return TRUE;
197
198}
199
200
201//=============================================================================

Callers 3

DirList_DestroyFunction · 0.85
DirList_StartIconThreadFunction · 0.85
DirList_FillFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected