我排队
NSOperationQueue *operationQueue = [[NSOperationQueue alloc] init];
我将队列发送到我的异步请求
[NSURLConnection sendAsynchronousRequest:req queue:operationQueue completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
dispatch_async(dispatch_get_main_queue(), ^{
// ... do stuff here
});
}];
我提前取消了我的操作
[operationQueue cancelAllOperations];
但是,我可以看到我的异步“完成”代码仍在运行。为什么这种情况不像我预期的那样工作?