Need the reads on the property to be atomic as well. Otherwise there as cases like 'startAnimating' getting called from two seperate threads. Each would read a value A. The first thread would then write the value A+1. Thread 2 also read A so it would also write A+1. As a result missing an increment

This commit is contained in:
Evan Long 2011-08-30 22:01:03 -07:00
parent dddd567424
commit 9a0ed2497c

View file

@ -23,7 +23,7 @@
#import "AFNetworkActivityIndicatorManager.h"
@interface AFNetworkActivityIndicatorManager ()
@property (readwrite, nonatomic, assign) NSInteger activityCount;
@property (readwrite, assign) NSInteger activityCount;
@end
@implementation AFNetworkActivityIndicatorManager