Re: Canceling a NSURLConnection
Re: Canceling a NSURLConnection
- Subject: Re: Canceling a NSURLConnection
- From: Andreas Grosam <email@hidden>
- Date: Wed, 25 Apr 2012 10:17:08 +0200
On Apr 25, 2012, at 9:45 AM, Andreas Grosam wrote:
> Hi All!
>
> I'm having an issue how to properly and reliably canceling a NSURLConnection scheduled on a secondary thread and would really appreciate help.
>
>
> The actual issue is that sometimes (not always) sending a message from the main thread - which is basically a higher level cancel message - to the thread where the connection delegates are scheduled will block infinitively. I'm sending the message from the main thread via:
I believe, I've found the issue:
A connection delegate method called a dispatch_async() on the main thread *sigh* - this was unnoticed and this code remained *accidentally*, after updating. I believe, this was the dead lock.
Anyway - any comments to this technique are welcome.
Andreas
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden