• 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: Showing activity indicator during data download
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Showing activity indicator during data download


  • Subject: Re: Showing activity indicator during data download
  • From: Alastair Houghton <email@hidden>
  • Date: Thu, 29 Oct 2009 16:22:30 +0000

On 29 Oct 2009, at 16:04, DKJ wrote:

On 2009-10-29, at 7:05 , Alastair Houghton wrote:
the code above is a no-no

Thanks for your reply. I'm using a UIActivityIndicatorView, and I found a place in the docs where it says almost all of UIKit is not thread-safe.


But just out of curiosity, what horrible things might happen with the code I posted?

Everything from rendering faults down to outright crashes, memory corruption and so on. It all depends on exactly what code is being run and how it's been written.


Moreover, some of the problems may manifest themselves as "Heisenbugs", which are notoriously difficult to track down (and in some cases hard enough just to *understand*). Or they may only happen on particular models, perhaps because they have a slightly faster or slower CPU, or because they're using e.g. a different graphics driver.

Basically, all the usual problems that you might have if you start writing multi-threaded code without paying any attention to thread- safety.

Oh, *and* just in case you're tempted to try the "test it and use it if it works, because it's simple" approach to software development, you should remember that *even if* you were to test on every currently available device and with every currently in-use version of the iPhone OS, there's nothing stopping Apple from releasing new devices or software updates that will cause it to break, because they didn't guarantee thread-safety and you're assuming it.

Kind regards,

Alastair.

--
http://alastairs-place.net



_______________________________________________

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: 
 >Showing activity indicator during data download (From: DKJ <email@hidden>)
 >Re: Showing activity indicator during data download (From: DKJ <email@hidden>)
 >Re: Showing activity indicator during data download (From: Alastair Houghton <email@hidden>)

  • Prev by Date: Re: how to filter available fonts for my application?
  • Next by Date: Re: how to filter available fonts for my application?
  • Previous by thread: Re: Showing activity indicator during data download
  • Next by thread: Re: Showing activity indicator during data download
  • Index(es):
    • Date
    • Thread