...
|
...
|
@@ -46,7 +46,7 @@ NS_INLINE NSString *YH_Objectkey(id anyObject) { |
|
|
@property (nonatomic, strong) NSMutableArray *tabViewControllerArray;
|
|
|
/**页面调用链*/
|
|
|
@property (nonatomic, strong) NSMutableArray *pageChains;
|
|
|
@property (nonatomic, strong) NSLock *lock;
|
|
|
//@property (nonatomic, strong) NSLock *lock;
|
|
|
@end
|
|
|
|
|
|
|
...
|
...
|
@@ -68,8 +68,8 @@ NS_INLINE NSString *YH_Objectkey(id anyObject) { |
|
|
self.serialQueue = dispatch_queue_create([kYHEventReportQueue UTF8String], DISPATCH_QUEUE_SERIAL);
|
|
|
self.timedEvents = [NSMutableDictionary dictionary];
|
|
|
self.pageChains = [NSMutableArray array];
|
|
|
self.lock = [[NSLock alloc] init];
|
|
|
self.lock.name = @"com.yoho.buy.EventCollector";
|
|
|
// self.lock = [[NSLock alloc] init];
|
|
|
// self.lock.name = @"com.yoho.buy.EventCollector";
|
|
|
NSArray *tabAry= @[];
|
|
|
self.tabViewControllerArray = [NSMutableArray arrayWithArray:tabAry];
|
|
|
|
...
|
...
|
@@ -645,26 +645,27 @@ NS_INLINE NSString *YH_Objectkey(id anyObject) { |
|
|
if (!viewController) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
[self.lock lock];
|
|
|
NSParameterAssert(NSThread.isMainThread);
|
|
|
// [self.lock lock];
|
|
|
|
|
|
if (self.pageChains.count > 10) {
|
|
|
[self.pageChains removeObjectAtIndex:0];
|
|
|
}
|
|
|
[self.pageChains addObject:[NSString stringWithFormat:@"%@",[viewController class]]];
|
|
|
|
|
|
[self.lock unlock];
|
|
|
// [self.lock unlock];
|
|
|
}
|
|
|
|
|
|
- (NSString *)pageChainStr
|
|
|
{
|
|
|
[self.lock lock];
|
|
|
NSParameterAssert(NSThread.isMainThread);
|
|
|
// [self.lock lock];
|
|
|
if (!self.pageChains || self.pageChains.count == 0) {
|
|
|
return @"";
|
|
|
}
|
|
|
|
|
|
NSString *resultChain = [[[self.pageChains reverseObjectEnumerator] allObjects] componentsJoinedByString:@","];
|
|
|
[self.lock unlock];
|
|
|
// [self.lock unlock];
|
|
|
|
|
|
return resultChain;
|
|
|
}
|
...
|
...
|
|