The Interlocked methods attempt to make an operation and assignment atomic and ensure two Interlocked methods don't operate on the same bit of memory at the same time; but it doesn't lock out other threads/processes from performing other atomic operations on that memory.
Raymond Chen explains it here with some examples: http://blogs.msdn.com/oldnewthing/archive/2004/09/15/229915.aspx If all the assignment operations on a member are done with Interlocked methods you don't need locking (or compare); if you're doing other assignments (which themselves are atomic) then you'll need locking. On Sat, 14 Apr 2007 07:07:31 -0700, Brad Wilson <[EMAIL PROTECTED]> wrote: >I don't mean to pick what might seem like a nit, but how is InterlockedXxx >not a lock? =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com