update thread_safe