Don't wait for selectors to perform on main thread, and don't schedule in particular run loops

This commit is contained in:
Mattt Thompson 2011-08-08 20:07:55 -05:00
parent 065ee0226f
commit 662af980c3

View file

@ -250,7 +250,7 @@ static inline BOOL AFHTTPOperationStateTransitionIsValid(AFHTTPOperationState fr
self.responseBody = [NSData dataWithData:self.dataAccumulator]; self.responseBody = [NSData dataWithData:self.dataAccumulator];
self.dataAccumulator = nil; self.dataAccumulator = nil;
[self performSelectorOnMainThread:@selector(finish) withObject:nil waitUntilDone:YES modes:[self.runLoopModes allObjects]]; [self performSelectorOnMainThread:@selector(finish) withObject:nil waitUntilDone:NO];
} }
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error {
@ -258,7 +258,7 @@ static inline BOOL AFHTTPOperationStateTransitionIsValid(AFHTTPOperationState fr
self.error = error; self.error = error;
[self performSelectorOnMainThread:@selector(finish) withObject:nil waitUntilDone:YES modes:[self.runLoopModes allObjects]]; [self performSelectorOnMainThread:@selector(finish) withObject:nil waitUntilDone:NO];
} }
- (NSCachedURLResponse *)connection:(NSURLConnection *)connection willCacheResponse:(NSCachedURLResponse *)cachedResponse { - (NSCachedURLResponse *)connection:(NSURLConnection *)connection willCacheResponse:(NSCachedURLResponse *)cachedResponse {