File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -45,14 +45,14 @@ - (NSString *)description {
45
45
- (id )objectForKey : (id )key {
46
46
__block id object;
47
47
dispatch_sync (_queue, ^{
48
- object = self->_objects [ key];
48
+ object = [ self ->_objects objectForKey: key];
49
49
});
50
50
return object;
51
51
}
52
52
53
53
- (void )setObject : (id )object forKey : (id <NSCopying >)key {
54
54
dispatch_async (_queue, ^{
55
- self->_objects [key] = object;
55
+ [ self ->_objects setObject: object forKey: key] ;
56
56
});
57
57
}
58
58
@@ -77,13 +77,17 @@ - (NSUInteger)count {
77
77
}
78
78
79
79
- (id )objectForKeyedSubscript : (id <NSCopying >)key {
80
- // The method this calls is already synchronized.
81
- return [self objectForKey: key];
80
+ __block id object;
81
+ dispatch_sync (_queue, ^{
82
+ object = self->_objects [key];
83
+ });
84
+ return object;
82
85
}
83
86
84
87
- (void )setObject : (id )obj forKeyedSubscript : (id <NSCopying >)key {
85
- // The method this calls is already synchronized.
86
- [self setObject: obj forKey: key];
88
+ dispatch_async (_queue, ^{
89
+ self->_objects [key] = obj;
90
+ });
87
91
}
88
92
89
93
- (NSDictionary *)dictionary {
You can’t perform that action at this time.
0 commit comments