cancel an ASIHTTPRequest thread

Posted by user262325 on Stack Overflow See other posts from Stack Overflow or by user262325
Published on 2010-03-22T03:13:03Z Indexed on 2010/03/22 4:11 UTC
Read the original article Hit count: 343

Filed under:

Hello evryone

I have some codes to use ASINetworkQueue as multi thread download

ASINetworkQueue *networkQueue;

NSURL *url = [NSURL URLWithString:s];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];


[networkQueue  addOperation:request];

[networkQueue  go];

if I try to use the code below to cancel the thread with index k [[[networkQueue operations] objectAtIndex:k] cancel];

I notice all requests in ASINetworkQueue were cancelled and stop working.

Welcome any comment

Thanks

interdev

© Stack Overflow or respective owner

Related posts about iphone