diff options
author | Thomas Van Lenten <thomasvl@google.com> | 2016-03-21 13:57:14 -0400 |
---|---|---|
committer | Thomas Van Lenten <thomasvl@google.com> | 2016-03-21 13:57:14 -0400 |
commit | 92091363cd830cf322ac8482154a9c2377a01add (patch) | |
tree | 018b7755a546f18ee54e3fc48d6f8c69fdbcc67d /objectivec/GPBUtilities.m | |
parent | 5e933847cc9e7826f1a9ee8b3dc1df4960b1ea5d (diff) | |
parent | bd41a39f693d8307d407e42b634b315e075b6c8f (diff) | |
download | protobuf-92091363cd830cf322ac8482154a9c2377a01add.tar.gz protobuf-92091363cd830cf322ac8482154a9c2377a01add.tar.bz2 protobuf-92091363cd830cf322ac8482154a9c2377a01add.zip |
Merge pull request #1339 from thomasvl/delay_dispatch_semaphore_creation
Only create the readonlySemaphore on demand.
Diffstat (limited to 'objectivec/GPBUtilities.m')
-rw-r--r-- | objectivec/GPBUtilities.m | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/objectivec/GPBUtilities.m b/objectivec/GPBUtilities.m index 3e9d11c0..447c749a 100644 --- a/objectivec/GPBUtilities.m +++ b/objectivec/GPBUtilities.m @@ -412,6 +412,7 @@ id GPBGetObjectIvarWithField(GPBMessage *self, GPBFieldDescriptor *field) { return field.defaultValue.valueMessage; } + GPBPrepareReadOnlySemaphore(self); dispatch_semaphore_wait(self->readOnlySemaphore_, DISPATCH_TIME_FOREVER); GPBMessage *result = GPBGetObjectIvarWithFieldNoAutocreate(self, field); if (!result) { |