Search code examples
multithreadinglanguage-agnosticlockingthread-safetylock-free

Lockfree standard collections and tutorial or articles


Does someone know of a good resource for the implementation (meaning source code) of lock-free usual data types. I'm thinking of Lists, Queues and so on?

Locking implementations are extremely easy to find but I can't find examples of lock free algorithms and how to exactly does CAS work and how to use it to implement those structures.


Solution

  • Check out Julian M Bucknall's blog. He describes (in detail) lock-free implementations of queues, lists, stacks, etc.

    http://www.boyet.com/Articles/LockfreeQueue.html

    http://www.boyet.com/Articles/LockfreeStack.html