bugfix deadlock

This commit is contained in:
Akash Mozumdar 2018-08-30 02:29:06 -04:00
parent 6a25a41d79
commit 8342850bb7

View File

@ -9,10 +9,10 @@ TextThread::TextThread(ThreadParam tp, DWORD status) : tp(tp), status(status) {}
TextThread::~TextThread() TextThread::~TextThread()
{ {
LOCK(ttMutex);
SetEvent(deletionEvent); SetEvent(deletionEvent);
flushThread.join(); flushThread.join();
CloseHandle(deletionEvent); CloseHandle(deletionEvent);
LOCK(ttMutex);
} }
std::wstring TextThread::GetStore() std::wstring TextThread::GetStore()