I have a function in which the processing is given over to a new thread.
The problem is the place where the function is called from does not wait for the function to return and promptly executes whatever code was there after the function call. How do I wait for the function to return so no code after it gets executed until its returned?
Hope I am not too vague. I am still new to the concept of multi-threading.