When you start a thread, it will execute until it is finished.
Often, at some point, you need to (possibly - the thread may already be done) wait for the thread to finish, because you want to use the result for example.
int n;
std::thread thread{ calculateSomething, std::ref(n) };
//Doing some...