+ 1
How to implement threading in C++ ?
Looking for any reference material to multiple threading.
1 Respuesta
+ 2
First Question: Which Plattform? Which C++-Version?
Since C++11 we have std::thread, which helps a lot with threading.
=> http://en.cppreference.com/w/cpp/thread/thread
so basically:
void thread_main() {
std::cout << "hello thread";
}
int main() {
auto thread = std::thread(thread_main);
std::cout << "Hello Main";
thread.join();
return 0;
}