Re: Accessing array in thread safe way
Re: Accessing array in thread safe way
- Subject: Re: Accessing array in thread safe way
- From: CoGe - Tamas Nagy <email@hidden>
- Date: Thu, 08 Mar 2012 15:22:43 +0100
Maybe this will helps you, here is my thread-safe subclass of NSMutableArray: http://code.google.com/p/cogeopensource/source/browse/trunk/CoGeOpenSource/CoGeThreadSafeMutableArray.m
Works well for my project.
On Mar 8, 2012, at 11:22 AM, Jan E. Schotsman wrote:
> Thanks for all the answers.
>
> 1. I'll read the ThreadSafetySummary. So far I had only read the Threading section of the Objective C Programming Language.
>
> 2. Accessing the progress values of the subprojects seems the way to go here.
>
> 3. Creating a proxy mutable array seems like overkill. Basically this is a thread-safe subclass of NSMutableArray, correct?
>
> 4. @Don Quixote: interesting lecture. Now I know what 'lockfree" means.
>
>> To improve performance share as little data as possible, access it as infrequently as possible and if you access it at all, finish what you're doing with the shared data as quickie as you can.
>
> In this case the subprojects shouldn't update their progress values too often. Only if additional progress is more than 1% for example.
>
> Jan E.
> _______________________________________________
>
> 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
Tamas Nagy
-----------------
CoGe VJ Software
http://cogevj.hu
email@hidden
_______________________________________________
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