If a function may be applied (simultaneously) by multiple threads is the safe (correct) procedure to wrap the function inside a class and have each thread create its own instance of the class? Thanks