Adding Mach port to keep runloop alive
This commit is contained in:
parent
0ae4872df8
commit
c75b9f46c3
1 changed files with 7 additions and 2 deletions
|
|
@ -187,8 +187,13 @@ static BOOL AFSecKeyIsEqualToKey(SecKeyRef key1, SecKeyRef key2) {
|
|||
@synthesize lock = _lock;
|
||||
|
||||
+ (void)networkRequestThreadEntryPoint:(id)__unused object {
|
||||
[[NSThread currentThread] setName:@"AFNetworking"];
|
||||
[[NSRunLoop currentRunLoop] run];
|
||||
@autoreleasepool {
|
||||
[[NSThread currentThread] setName:@"AFNetworking"];
|
||||
|
||||
NSRunLoop *runLoop = [NSRunLoop currentRunLoop];
|
||||
[runLoop addPort:[NSMachPort port] forMode:NSDefaultRunLoopMode];
|
||||
[runLoop run];
|
||||
}
|
||||
}
|
||||
|
||||
+ (NSThread *)networkRequestThread {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue