A simple threaded program: questions and doubts about detach() – Ubuntu
Here is my threaded program, which is very simple: #include <iostream> #include <thread> using namespace std; void myprint(int a) { cout << a << endl; } int main() { thread obj(myprint, 3); obj.detach(); cout << "end!!!" << endl; } What…