• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Canceling a NSURLConnection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Canceling a NSURLConnection (From: Andreas Grosam <email@hidden>)

  • Prev by Date: Canceling a NSURLConnection
  • Next by Date: Re: Losing attachments when saving rtfd
  • Previous by thread: Canceling a NSURLConnection
  • Next by thread: WWDC
  • Index(es):
    • Date
    • Thread