mainthreadonly Properties
Steven Fisher proposes a new Objective-C property attribute:
mainthreadonlywould be likenonatomic. Compared tononatomic, it also warns that the property can only be set from the main thread.@synthesizewould generate a setter that is not onlynonatomic, but generates an exception if called from a thread other than the main thread.
Sounds good to me, although I see no reason why this sort of annotation should be limited to properties. Some other methods also must be called from the main thread.