We used to use a ordinary number field to dynamically generate record names in the trigger (because the name is composed of several parts). But now we are considering more about the thread safety. Say suppose two users try to create a record at the same time, the trigger might possibly populate a same number. So we are thinking of switching to auto-number though it is not strictly consecutive.
However, as we are working for a managed package. Auto-number field cannot be added into a managed package object. Is there a proper way to generate an auto-number like field when considering thread safety?