Making the various localization callbacks thread-safe.