• 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: Background processing and progress updates
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Background processing and progress updates


  • Subject: Re: Background processing and progress updates
  • From: Michael Dautermann <email@hidden>
  • Date: Wed, 1 Aug 2007 03:52:43 -0700


On Aug 1, 2007, at 3:43 AM, Christian Moen wrote:

I'm thinking about starting the processing as a separate thread, which keeps
track of progress and status, and makes this information available through
some accessors. Additionally, I'm thinking setting up a timer that polls
the accessors every 1/10th of second or so to update the sheet. If an error
occurs, I'll call a method in the main thread.

Hi Christian,

The way I do stuff like this in my apps is to have my separate processing thread send a message (for example, percent completed) to the progress dialog running off the main thread via:

[ NSObject performSelectorOnMainThread:withObject:waitUntilDone:]

That'd be much nicer than polling.

Also, if you're using a "sheet" (which is modal), that implies that your whole app is going to freeze while processing is going on (which negates the need to run this on a separate thread). Perhaps what you'd want instead is a progress dialog that the user can open / close on demand?

I hope this advice helps!

michael


_______________________________________________

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: Background processing and progress updates
      • From: Alastair Houghton <email@hidden>
References: 
 >Background processing and progress updates (From: "Christian Moen" <email@hidden>)

  • Prev by Date: Background processing and progress updates
  • Next by Date: Core Data compound keys
  • Previous by thread: Background processing and progress updates
  • Next by thread: Re: Background processing and progress updates
  • Index(es):
    • Date
    • Thread