• 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: [Q] Why is the threading and UI updating designed to be done only on a main thread?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Q] Why is the threading and UI updating designed to be done only on a main thread?


  • Subject: Re: [Q] Why is the threading and UI updating designed to be done only on a main thread?
  • From: Wade Tregaskis <email@hidden>
  • Date: Wed, 14 Mar 2012 14:00:44 -0700

> The problem of course, is that in order to allow that, the framework itself has to be locking things all over the place, regardless of whether or not an app is actually accessing any particular data from multiple threads, because now the framework has to assume that might happen.

Yes and no.  Or, maybe.  There are many possible implementations.  For example, you could have a designated thread/queue for each separate window/document/whatever, as I suggested, in which case the mutual exclusion is largely implicit and disappears in the noise.

In any case, uncontested locks (if done correctly) are not very expensive at all.  Not at the granularity we're talking about here.
_______________________________________________

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: 
 >[Q] Why is the threading and UI updating designed to be done only on a main thread? (From: JongAm Park <email@hidden>)
 >Re: [Q] Why is the threading and UI updating designed to be done only on a main thread? (From: Scott Ribe <email@hidden>)
 >Re: [Q] Why is the threading and UI updating designed to be done only on a main thread? (From: Scott Ribe <email@hidden>)
 >Re: [Q] Why is the threading and UI updating designed to be done only on a main thread? (From: Wade Tregaskis <email@hidden>)
 >Re: [Q] Why is the threading and UI updating designed to be done only on a main thread? (From: JongAm Park <email@hidden>)
 >Re: [Q] Why is the threading and UI updating designed to be done only on a main thread? (From: Scott Ribe <email@hidden>)

  • Prev by Date: Re: [Q] Why is the threading and UI updating designed to be done only on a main thread?
  • Next by Date: Re: [Q] Why is the threading and UI updating designed to be done only on a main thread?
  • Previous by thread: Re: [Q] Why is the threading and UI updating designed to be done only on a main thread?
  • Next by thread: Re: [Q] Why is the threading and UI updating designed to be done only on a main thread?
  • Index(es):
    • Date
    • Thread