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