code factoring for ThreadSafetyBuiltinObject