#include <string>
#include <thread>
class MyClass
{
public:
MyClass():DiskJobThread(){};
~MyClass();
void DoDiskJobThread();
private:
int CopyThread(const std::wstring & Source, const std::wstring & Target) { return 0; }
int MoveThread(const std::wstring & Source, const std::wstring & Target) { return 0; }
std::thread DiskJobThread;
};
MyClass::~MyClass()
{
DiskJobThread.join();
}
void MyClass::DoDiskJobThread()
{
std::wstring Source/* = GetSource()*/;
std::wstring Target/* = GetTarget()*/;
int m_OperationType/* = GetOperationType()*/;
DiskJobThread = std::thread(&MyClass::CopyThread, this, Source, Target);
DiskJobThread = std::thread(&MyClass::MoveThread, this, Source, Target);
}
int main()
{}
I2luY2x1ZGUgPHN0cmluZz4KI2luY2x1ZGUgPHRocmVhZD4KCmNsYXNzIE15Q2xhc3MKewogICAgcHVibGljOgogICAgICAgIE15Q2xhc3MoKTpEaXNrSm9iVGhyZWFkKCl7fTsKICAgICAgICB+TXlDbGFzcygpOwoKICAgICAgICB2b2lkIERvRGlza0pvYlRocmVhZCgpOwoKICAgIHByaXZhdGU6CiAgICAgICAgaW50IENvcHlUaHJlYWQoY29uc3Qgc3RkOjp3c3RyaW5nICYgU291cmNlLCBjb25zdCBzdGQ6OndzdHJpbmcgJiBUYXJnZXQpIHsgcmV0dXJuIDA7IH0KICAgICAgICBpbnQgTW92ZVRocmVhZChjb25zdCBzdGQ6OndzdHJpbmcgJiBTb3VyY2UsIGNvbnN0IHN0ZDo6d3N0cmluZyAmIFRhcmdldCkgeyByZXR1cm4gMDsgfQogICAgICAgIHN0ZDo6dGhyZWFkIERpc2tKb2JUaHJlYWQ7Cn07CgpNeUNsYXNzOjp+TXlDbGFzcygpCnsKICAgIERpc2tKb2JUaHJlYWQuam9pbigpOwp9Cgp2b2lkIE15Q2xhc3M6OkRvRGlza0pvYlRocmVhZCgpCnsKICAgIHN0ZDo6d3N0cmluZyBTb3VyY2UvKiA9IEdldFNvdXJjZSgpKi87CiAgICBzdGQ6OndzdHJpbmcgVGFyZ2V0LyogPSBHZXRUYXJnZXQoKSovOwogICAgaW50IG1fT3BlcmF0aW9uVHlwZS8qID0gR2V0T3BlcmF0aW9uVHlwZSgpKi87CiAgICBEaXNrSm9iVGhyZWFkID0gc3RkOjp0aHJlYWQoJk15Q2xhc3M6OkNvcHlUaHJlYWQsIHRoaXMsIFNvdXJjZSwgVGFyZ2V0KTsKICAgIERpc2tKb2JUaHJlYWQgPSBzdGQ6OnRocmVhZCgmTXlDbGFzczo6TW92ZVRocmVhZCwgdGhpcywgU291cmNlLCBUYXJnZXQpOwp9CgppbnQgbWFpbigpCnt9