Add threadsafe.