title: call a function many times in parallel
body: <p>I want to call a function with different value of arg many times. To make the execution faster I want to call the function without considering its implementation.</p>
  
  <p>Inside a loop i pass the arg to the function and call it now my program should not wait for the function to execute and loop again, instead it should not consider that the function has not completed for the first loop it should go ahead and call the function again and again till the loop ends.</p>
  
  <p>how to use fork and threads to do this , which one will be faster and a skeleton of code will help ?
  Lets say my function is void foo(arg1,arg2)</p>