I'm wrong, this is thread safe. You can have multiple threads calling xercesInitialize() but internally that code uses a mutex to make it safe. Also, s_initialized isn't changed to true until that routine ends and therefore if s_initialized is true you can be sure that xercesInitialize() has completed.