Update GPBMessage.m

Fix up some spelling/grammar.
pull/10766/head
dmaclach 2 years ago committed by Thomas Van Lenten
parent d7d780ce75
commit e5698b9e67
  1. 13
      objectivec/GPBMessage.m

@ -80,18 +80,17 @@ static NSString *const kGPBDataCoderKey = @"GPBData";
GPBFieldDescriptor *autocreatorField_;
GPBExtensionDescriptor *autocreatorExtension_;
// Message can only be mutated from one thread. But some *readonly* operations modify internal
// Messages can only be mutated from one thread. But some *readonly* operations modify internal
// state because they autocreate things. The autocreatedExtensionMap_ is one such structure.
// Access during readonly operations is protected via this semaphore.
// Access during readonly operations is protected via this lock.
//
// Long ago, this was a OSSpinLock, but then it came to light that there were issues for that on
// Long ago, this was an OSSpinLock, but then it came to light that there were issues for that on
// iOS:
// http://mjtsai.com/blog/2015/12/16/osspinlock-is-unsafe/
// https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20151214/000372.html
// So it was a dispatch_semaphore_t, but that has issues with priority inversion if developer code
// uses queue for different things. But the minOS versions are now high enough, os_unfair_lock and
// be used, and should provide all the support needed. For more information in the
// concurrence/locking space see:
// It was changed to a dispatch_semaphore_t, but that has potential for priority inversion issues.
// The minOS versions are now high enough that os_unfair_lock can be used, and should provide
// all the support we need. For more information in the concurrency/locking space see:
// https://gist.github.com/tclementdev/6af616354912b0347cdf6db159c37057
// https://developer.apple.com/library/archive/documentation/Performance/Conceptual/EnergyGuide-iOS/PrioritizeWorkWithQoS.html
// https://developer.apple.com/videos/play/wwdc2017/706/

Loading…
Cancel
Save