1
0

Hack to stop thread

This commit is contained in:
Scott E. Graves
2017-03-22 19:02:19 -05:00
parent 4317742f65
commit 5b60aefc8b

View File

@@ -893,7 +893,6 @@ public:
_uploadManager.reset(new CUploadManager(CSiaCurl(_siaApi->GetHostConfig()), _siaDriveConfig));
_dokanOptions.MountPoint = _mountPoint.ToUpper().str().c_str();
_mountStatus = DokanMain(&_dokanOptions, &_dokanOps);
OutputDebugString(std::to_wstring(_mountStatus).c_str());
}));
}
}
@@ -904,6 +903,8 @@ public:
{
while (!DokanRemoveMountPoint(&_mountPoint[0]))
::Sleep(1000);
// HACK - DokanMain() never returns
::TerminateThread(_mountThread->native_handle(), -1);
_mountThread->join();
_mountThread.reset(nullptr);
_mountPoint = "";