I am new in multithread programming in c++. Today I had read that there is no copy constructor of std::thread and std::promise, my question is stupid simple: why? Yes, I understand that in some cases we have data race but there is cases where we don't have data race, it's not clear for me absolutely. Can anybody explain it?
I tried to do like this, but of course it didn't work:
std::thread t1; std::thread t2 = t1;
But the std::move work nice. I approximately understood why it works so, but I want to detailed explain