• 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: Process crash while using NSURLConnection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Process crash while using NSURLConnection


  • Subject: Re: Process crash while using NSURLConnection
  • From: Dave Keck <email@hidden>
  • Date: Thu, 16 Jul 2009 19:31:45 -1000

Yeah, the NSURLConnection docs aren't too heavy on details when it
comes to threads, and what it does say about its threading behavior
seems purely consequential to the fact that NSURLConnection relies on
NS/CFRunLoop facilities, rather than NSUC implementing its own
thread-safe logic. So from the limited information available, as
usual, I wouldn't make any assumptions about the thread safety of it.

(As I side note, I'll say I've also experienced some very reproducible
crashes with NSURLConnection without doing anything fancy - I don't
remember all the details, but if you search Google for
"NSURLConnection crash," you'll get a fair number of hits. Which
speaks for itself, I guess.)

I just finished moving some non-thread-safe code into a separate
helper utility that's launched on-demand, and it's worked peachy for
me. While it takes some time and a lot more code than it would
otherwise, it's really the only way to deal with situations where
something needs to run outside of the main thread, but doesn't play
nice with threads. So that's what I suggest...

Hope that helps,

David
_______________________________________________

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: 
 >Process crash while using NSURLConnection (From: Jean-Francois Dontigny <email@hidden>)

  • Prev by Date: Re: Why do CFType instances respond to NSObject messages?
  • Next by Date: Re: Initiating a To-many entity
  • Previous by thread: Process crash while using NSURLConnection
  • Next by thread: Why do CFType instances respond to NSObject messages?
  • Index(es):
    • Date
    • Thread