OSDN Git Service

fix double CloseHandle problem for m_threadHandle and m_readEvent
authorU-i7\gimy <gimy@users.sourceforge.jp>
Sat, 12 Sep 2009 13:35:15 +0000 (22:35 +0900)
committerU-i7\gimy <gimy@users.sourceforge.jp>
Sat, 12 Sep 2009 13:35:15 +0000 (22:35 +0900)
reduce timeout value to wait m_threadHandle

engine.cpp

index 6482510..d939cad 100644 (file)
@@ -1269,7 +1269,7 @@ void Engine::stop() {
        SetEvent(m_readEvent);\r
        ReleaseMutex(m_queueMutex);\r
 \r
-       WaitForSingleObject(m_threadHandle, 20000);\r
+       WaitForSingleObject(m_threadHandle, 2000);\r
        CHECK_TRUE( CloseHandle(m_threadHandle) );\r
        m_threadHandle = NULL;\r
 \r
@@ -1289,7 +1289,6 @@ bool Engine::prepairQuit() {
 \r
 \r
 Engine::~Engine() {\r
-       stop();\r
        CHECK_TRUE( CloseHandle(m_eSync) );\r
 \r
        // destroy named pipe for &SetImeString\r