add thread_safe_demo