Check out example codes for "c++ create threads". It will help you in understanding the concepts better.

Code Example 1

#include <thread>
void foo() 
{
  // do stuff...
}
int main() 
{
  std::thread first (foo);
  first.join();
}

Learn ReactJs, React Native from akashmittal.com