Re: Accessing array in thread safe way
Re: Accessing array in thread safe way
- Subject: Re: Accessing array in thread safe way
- From: Jeffrey Walton <email@hidden>
- Date: Thu, 08 Mar 2012 14:48:49 -0500
On Thu, Mar 8, 2012 at 10:46 AM, Per Bull Holmen <email@hidden> wrote:
> Den 23:55 7. mars 2012 skrev Don Quixote de la Mancha
> <email@hidden> følgende:
>
>> If you possibly can replace locking algorithms with what are commonly but incorrectly called lock free algorithms. They use Atomic Arithmetic Primitives provided by the CPU Instruction Set Archetector to manage very short term locks on single words of memory.
>
> Lock-free algorithms are cool, but keep in mind that they can be hard
> to implement, so you have to know what you're doing. Once you have
> forgotten to think of a possible scheduling sequence that might
> corrupt your data, you have introduced very subtle bugs that can be
> very hard to track down.
And it may not scale... What if the program runs virtualized? Memory
locks on one machine are not honored on a separate, virtualized
server.
_______________________________________________
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