C++ return value from multithreads using reference

C++ return value from multithreads using reference

Here is my code:
vector<MyClass> objs;
vector<thread> multi_threads;
multi_threads.resize(4);
for(int i = 0; i < 4; i++)
{
multi_threads[i] = std::thread(&MyFunction, &objs[i]);
// each thread change some member variable in objs[i]
multi_threads[i].join();
}
I expect that the elements in objs can be changed at each thread. Then
after the threads finished, I can get access to the member data.
However, when the program finished the above loop, the member variables
I'd like to get is not changed at all.
I guess this is because the multi-threading mechanism in C++, but I don't
know what exactly I did wrong. And may I know how to achieve my
expectation?
Many thanks.