@@ -23,10 +23,6 @@ MiniThingCore::MiniThingCore(void)
23
23
24
24
MiniThingCore::~MiniThingCore (void )
25
25
{
26
- if (FAILED (SQLiteClose ()))
27
- {
28
- assert (0 );
29
- }
30
26
}
31
27
32
28
void MiniThingCore::SetDataBasePath (std::wstring dbName)
@@ -727,18 +723,28 @@ void MiniThingCore::StopMonitorThread(void)
727
723
{
728
724
for (auto it = m_volumeSet.begin (); it != m_volumeSet.end (); it++)
729
725
{
730
- SetEvent (it->hMonitorExitEvent );
731
- DWORD dwWaitCode = WaitForSingleObject (it->hMonitor , INFINITE);
732
- assert (dwWaitCode == WAIT_OBJECT_0);
726
+ // SetEvent(it->hMonitorExitEvent);
727
+ // DWORD dwWaitCode = WaitForSingleObject(it->hMonitor, INFINITE);
728
+ // assert(dwWaitCode == WAIT_OBJECT_0);
729
+
730
+ // Normally we shoud send exit event, and wait thread exit itself
731
+ // But it seems that the thread enter dead lock when exit
732
+ // So terminate the thread by hand
733
+ TerminateThread (it->hMonitor , 0 );
733
734
734
735
CloseHandle (it->hMonitor );
735
736
736
737
delete it->pMonitorTaskInfo ;
737
738
}
738
739
739
- SetEvent (m_hUpdateSqlDataBaseExitEvent);
740
- DWORD dwWaitCode = WaitForSingleObject (m_hUpdateSqlDataBaseThread, INFINITE);
741
- assert (dwWaitCode == WAIT_OBJECT_0);
740
+ // SetEvent(m_hUpdateSqlDataBaseExitEvent);
741
+ // DWORD dwWaitCode = WaitForSingleObject(m_hUpdateSqlDataBaseThread, INFINITE);
742
+ // assert(dwWaitCode == WAIT_OBJECT_0);
743
+
744
+ // Normally we shoud send exit event, and wait thread exit itself
745
+ // But it seems that the thread enter dead lock when exit
746
+ // So terminate the thread by hand
747
+ TerminateThread (m_hUpdateSqlDataBaseThread, 0 );
742
748
}
743
749
744
750
HRESULT MiniThingCore::CreateQueryThread (void )
0 commit comments