Hack to stop thread
This commit is contained in:
@@ -893,7 +893,6 @@ public:
|
|||||||
_uploadManager.reset(new CUploadManager(CSiaCurl(_siaApi->GetHostConfig()), _siaDriveConfig));
|
_uploadManager.reset(new CUploadManager(CSiaCurl(_siaApi->GetHostConfig()), _siaDriveConfig));
|
||||||
_dokanOptions.MountPoint = _mountPoint.ToUpper().str().c_str();
|
_dokanOptions.MountPoint = _mountPoint.ToUpper().str().c_str();
|
||||||
_mountStatus = DokanMain(&_dokanOptions, &_dokanOps);
|
_mountStatus = DokanMain(&_dokanOptions, &_dokanOps);
|
||||||
OutputDebugString(std::to_wstring(_mountStatus).c_str());
|
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -904,6 +903,8 @@ public:
|
|||||||
{
|
{
|
||||||
while (!DokanRemoveMountPoint(&_mountPoint[0]))
|
while (!DokanRemoveMountPoint(&_mountPoint[0]))
|
||||||
::Sleep(1000);
|
::Sleep(1000);
|
||||||
|
// HACK - DokanMain() never returns
|
||||||
|
::TerminateThread(_mountThread->native_handle(), -1);
|
||||||
_mountThread->join();
|
_mountThread->join();
|
||||||
_mountThread.reset(nullptr);
|
_mountThread.reset(nullptr);
|
||||||
_mountPoint = "";
|
_mountPoint = "";
|
||||||
|
Reference in New Issue
Block a user