Hack to stop thread
This commit is contained in:
@@ -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 = "";
|
||||
|
Reference in New Issue
Block a user