Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

C++ thread id

thread thread1();

thread::id id1 = thread1.get_id();

if (thread1.joinable())
{
  thread1.join();

  cout << "Thread ID: " << id1 << " ...thread1 executed!" << endl;
}
Source by www.cplusplus.com #
 
PREVIOUS NEXT
Tagged: #thread #id
ADD COMMENT
Topic
Name
4+2 =