Made settings_t thread-safe.