Skip to content

Instantly share code, notes, and snippets.

@redforce01
Created March 23, 2017 01:16
for my blog gist - thread code #4
class ThreadPara
{
public:
void func()
{
for(int i = 0; i < 5; i++)
std::cout << "ThreadPara Num : " << i << std::endl;
}
};
ThreadPara thread_para;
std::thread myThread(&ThreadPara::func, &thread_para);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment