• 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: Beachball on Lengthy Task
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Beachball on Lengthy Task


  • Subject: Re: Beachball on Lengthy Task
  • From: Andrew Farmer <email@hidden>
  • Date: Sun, 5 Apr 2009 14:59:42 -0700

On 05 Apr 09, at 08:17, Michael Ash wrote:
On Sun, Apr 5, 2009 at 9:33 AM, Kirk Kerekes <email@hidden> wrote:
Along with threads and various asynchronous techniques already mentioned,
you should also consider creating a separate UI-less "foundation tool" to
perform your lengthy task, controlled with NSTask in your main app. This
yields all of the benefits of a thread, with none of the threading pitfalls.
Getting real-time feedback (for a progress indicator, for example) from the
task is more complex than with a thread, and getting result data back is
slightly more involved, but the absolute freedom from threading issues is
often worth it.


Several of Apple's utility apps are constructed as a UI shell that invokes
one or more tools.

I recommend avoiding this if possible. Processes are a somewhat scarce resource on OS X (only 266 per user by default, looks like) and you don't want to be using up more than you have to. It's unfortunate because it can make things easier as you say.

It's also not particularly effective if your lengthy task involves any significant processing of data that's been created within your application. Most of Apple's utility apps that use helper tools (Disk Utility, Network Utility, et al) don't need to pass anything beyond a few parameters to their helper tools; if your application does, though, trying to split out functionality to a separate executable may make things worse rather than better.
_______________________________________________


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: Beachball on Lengthy Task
      • From: Marcel Weiher <email@hidden>
References: 
 >RE:Beachball on Lengthy Task (From: Kirk Kerekes <email@hidden>)
 >Re: Beachball on Lengthy Task (From: Michael Ash <email@hidden>)

  • Prev by Date: Re: NSString and decoding HTML Entities
  • Next by Date: Re: NSString and decoding HTML Entities
  • Previous by thread: Re: Beachball on Lengthy Task
  • Next by thread: Re: Beachball on Lengthy Task
  • Index(es):
    • Date
    • Thread