2
取消可能会停止AFHTTPRequestOperation的实例,但有时会失败。如何停止AFHTTPRequestOperation?
任何人都有解决方案来立即停止AFHTTPRequestOperation实例或延迟秒?
取消可能会停止AFHTTPRequestOperation的实例,但有时会失败。如何停止AFHTTPRequestOperation?
任何人都有解决方案来立即停止AFHTTPRequestOperation实例或延迟秒?
AFAIK,没有什么比你能用AFHTTPRequestOperation做的更多!
AFHTTPRequestOperation *operation = [AFHTTPRequestOperation operationWithRequest:request success:success failure:failure];
[self.operationQueue addOperation:operation];
[operation performSelector:@selector(cancel) withObject:nil afterDelay:.5];
可以编辑你的问题,显示的代码显示您目前如何取消请求操作一点点?并且该操作在与您要求取消的线程分离的线程上,对吗? –
也许这将有助于 - http://stackoverflow.com/questions/12361824/how-to-immediately-force-cancel-an-nsoperation-with-afnetworking – Anthony