I know that a variable cannot be touched by multiple threads, but what about a function?
The code that calls a function will treat the output like a variable, but I can't quite figure out if it is the same.
Obviously if the function accesses a variable, and is called by the multiple threads then that would be a problem but what if it only uses local variables. Is the local variable then created independently in each thread?
What if the function is making a OS API call and converting it into a number which is the function result?
thanks, Philip