What are some advantages of Lockless Concurrency?

Technology CommunityCategory: ConcurrencyWhat are some advantages of Lockless Concurrency?
VietMX Staff asked 3 years ago

Lockless concurrency eliminates deadlocks and provides the nice advantage that readers never have to wait for other readers. This is especially useful when many threads will be reading data from a single source.

Lockless programming, is a set of techniques for safely manipulating shared data without using locks. There are lockless algorithms available for passing messages, sharing lists and queues of data, and other tasks. Lockless programming is pretty complicated. e.g. All purely functional data structures are inherently lock-free, since they are immutable.