• 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: App modal window and secondary thread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: App modal window and secondary thread


  • Subject: Re: App modal window and secondary thread
  • From: Chris Hanson <email@hidden>
  • Date: Sat, 20 Mar 2010 22:41:15 -0700

On Mar 20, 2010, at 4:24 AM, Philippe Sismondi <email@hidden> wrote:

Had I not been compelled to support OS X 10.4 I would have re- written the whole thing to use something better than threads - GCD or NSOperationQueue capabilities are said to be safer, although I have not yet learned them.

Let's nip this in the bud: NSOperation and GCD are not "safer than threads" -they *are* threads.


They are a more convenient API but they're still concurrent programming -and that's what's hard about programming against threads, not the API itself.

In particular, they *do not* insulate you from AppKit or Core Data's threading model. And a particular operation or dispatch to a concurrent queue can be served by any thread, without any strong binding to one thread (modulo the binding of the main queue to the main thread).

I would also not invoke abortModal on a background thread just as a matter of cleanliness. I'd implement a delegate/callback/notification for my background processor to tell whatever is controlling it that it's done. That's what would invoke abortModal - and it would do that on the main thread/queue.

  -- Chris

_______________________________________________

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: 
 >App modal window and secondary thread (From: Philippe Sismondi <email@hidden>)
 >Re: App modal window and secondary thread (From: Jens Alfke <email@hidden>)
 >Re: App modal window and secondary thread (From: Philippe Sismondi <email@hidden>)
 >Re: App modal window and secondary thread (From: Jens Alfke <email@hidden>)
 >Re: App modal window and secondary thread (From: Andrew James <email@hidden>)
 >Re: App modal window and secondary thread (From: Philippe Sismondi <email@hidden>)

  • Prev by Date: Re: Test for debug vs release
  • Next by Date: Re: Core Data: fetching a subset of attributes/columns
  • Previous by thread: Re: App modal window and secondary thread
  • Next by thread: NSUserDefaultsController valueForUndefinedKey:
  • Index(es):
    • Date
    • Thread