Re: Accessing array in thread safe way
Re: Accessing array in thread safe way
- Subject: Re: Accessing array in thread safe way
- From: Roland King <email@hidden>
- Date: Fri, 09 Mar 2012 17:51:30 +0800
On Mar 9, 2012, at 5:17 PM, CoGe - Tamas Nagy wrote:
> Thanks for the suggestion, its really appreciated! I'll do some tests - actually the GCD way seems to be the forward.
>
> Anyway, maybe the array contains non-thread safe objects (QCRenderers) - object that should not be bounce between different threads. But with those, I think I can't use GCD, because GCD cannot guarantie operations will perform on the exact same thread - or at least in my understanding.
>
That would be a problem. As I understand it also the serial GDC queues do not guarantee operations run on the same thread. If you want to go down that path you'll need to enque information to create the QCRender, but not actually create it until your block starts running, so you then create, use and dispose of it in the same call.
_______________________________________________
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