use thread_safe gem instead.