This can be done without any problems with the threads?
It makes no difference because in either case you're essentially manipulating a function pointer. One thing you *do* want to be careful with is static variables being used in functions that run in a threaded context, but that's another topic altogether.