c++ run lambda in thread code example
Example: c++ lambda thread example
std::thread t([](){
std::cout << "thread function\n";
});
t.join();
std::thread t([](){
std::cout << "thread function\n";
});
t.join();