[ObjC] Update comments about common failure causes. PiperOrigin-RevId: 509914968
diff --git a/objectivec/GPBMessage.h b/objectivec/GPBMessage.h index 5b7ce0c..d9fc898 100644 --- a/objectivec/GPBMessage.h +++ b/objectivec/GPBMessage.h
@@ -293,6 +293,10 @@ * * @note This can raise the GPBCodedOutputStreamException_* exceptions. * + * @note The most common cause of this failing is from one thread calling this + * while another thread has a reference to this message or a message used + * within a field and that other thread mutating the message while this + * serialization is taking place. **/ - (void)writeToCodedOutputStream:(GPBCodedOutputStream *)output; @@ -302,6 +306,11 @@ * @param output The output stream into which to write the message. * * @note This can raise the GPBCodedOutputStreamException_* exceptions. + * + * @note The most common cause of this failing is from one thread calling this + * while another thread has a reference to this message or a message used + * within a field and that other thread mutating the message while this + * serialization is taking place. **/ - (void)writeToOutputStream:(NSOutputStream *)output; @@ -312,6 +321,11 @@ * @param output The coded output stream into which to write the message. * * @note This can raise the GPBCodedOutputStreamException_* exceptions. + * + * @note The most common cause of this failing is from one thread calling this + * while another thread has a reference to this message or a message used + * within a field and that other thread mutating the message while this + * serialization is taking place. **/ - (void)writeDelimitedToCodedOutputStream:(GPBCodedOutputStream *)output; @@ -322,6 +336,11 @@ * @param output The output stream into which to write the message. * * @note This can raise the GPBCodedOutputStreamException_* exceptions. + * + * @note The most common cause of this failing is from one thread calling this + * while another thread has a reference to this message or a message used + * within a field and that other thread mutating the message while this + * serialization is taking place. **/ - (void)writeDelimitedToOutputStream:(NSOutputStream *)output; @@ -336,6 +355,11 @@ * @note In DEBUG ONLY, the message is also checked for all required field, * if one is missing, nil will be returned. * + * @note The most common cause of this failing is from one thread calling this + * while another thread has a reference to this message or a message used + * within a field and that other thread mutating the message while this + * serialization is taking place. + * * @return The binary representation of the message. **/ - (nullable NSData *)data; @@ -347,6 +371,11 @@ * @note This value is not cached, so if you are using it repeatedly, it is * recommended to keep a local copy. * + * @note The most common cause of this failing is from one thread calling this + * while another thread has a reference to this message or a message used + * within a field and that other thread mutating the message while this + * serialization is taking place. + * * @return The binary representation of the size along with the message. **/ - (NSData *)delimitedData;