Is there a lock-free & thread-safe data structure that implements IList?
Naturally by lock-free I mean an implementation that makes no use of locking primitives in .NET but rather uses interlocked operations / atomic operations to achieve thread safety... There isn't one, apparently under the concurrent data structures...
Has anyone seen one floating around?
I've seen a java one implemented in amino-cbbs, called LockFreeVector but nothing for .NET so far. Any ideas?
List<T>is quite lock-free. You should also clarify what you mean by "lock-free". - John SaundersInsertwithout locking (unless you allow spinning, I guess, since that isn't really the same as "locking"). But then, what do I know? - Dan TaoLockFreeVector<E>is based does not have a randomInsertoperation (which is part of theIList<T>interface). - Dan Tao