title: How do I make a function thread safe in C++?
body: <p>Let's say I have a thread pool that has 5 child threads. And they are calling a function called "functionA()" How do I make the function to be thread safe? </p>
  
  <p>Also if those 5 threads are called at the same time then are they executed concurrently?
   or do they wait until a thread that currently works in the function to be finished ?</p>
  
  <p>Thanks in advance..</p>