• 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: Help with Background Tasks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with Background Tasks


  • Subject: Re: Help with Background Tasks
  • From: Jens Alfke <email@hidden>
  • Date: Wed, 18 Nov 2009 11:35:57 -0800

On Nov 18, 2009, at 11:21 AM, Mark Bateman wrote:

> I am developing an App with a table that will hold URL content.  I want to download that in the background and then have it update the table as it arrives.

Don't do this using threads. Cocoa's networking APIs are asynchronous, so you can start a download using NSURLConnection and it will run in the background and notify your delegate when it's complete.

You almost never need to start threads in Cocoa programming. This can be hard to adjust to if you come from other frameworks, esp. Java.

—Jens

_______________________________________________

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

  • Follow-Ups:
    • Re: Help with Background Tasks
      • From: Mark Bateman <email@hidden>
References: 
 >Help with Background Tasks (From: Mark Bateman <email@hidden>)

  • Prev by Date: Re: Question about Style wrt "private" methods
  • Next by Date: Re: Question about Style wrt "private" methods
  • Previous by thread: Help with Background Tasks
  • Next by thread: Re: Help with Background Tasks
  • Index(es):
    • Date
    • Thread