|
@@ -180,13 +180,16 @@ static BGDB* BGdb = nil;
|
|
|
添加操作到线程池
|
|
|
*/
|
|
|
-(void)addToThreadPool:(void (^_Nonnull)())block{
|
|
|
- NSAssert(block, @"block is nil!");
|
|
|
+
|
|
|
if(!self.mulThreadPoolQueue || !self.mulThreadPool || !block){
|
|
|
HLog(@"\n\n\n\n\n\n\n addToThreadPool error");
|
|
|
- [cachesFileManager writeLogsWithMsg:@"addToThreadPool error"];
|
|
|
+ NSString *errorstr = [[NSString alloc] initWithFormat:@"addToThreadPool error block:%@,mulThreadPool:%@,mulThreadPoolQueue:%@",block,self.mulThreadPool,self.mulThreadPoolQueue ];
|
|
|
+ [cachesFileManager writeLogsWithMsg:errorstr];
|
|
|
//return;
|
|
|
}
|
|
|
|
|
|
+ NSAssert(block, @"block is nil!");
|
|
|
+
|
|
|
dispatch_async(self.mulThreadPoolQueue, ^{
|
|
|
NSString* key = [NSString stringWithFormat:@"b_%@_%@",@([[NSDate new] timeIntervalSince1970]),@(random())];
|
|
|
NSDictionary* dict = @{key:block};
|