Shared-memory IPC synchronization (lock-free)

Boost Interprocess has support for Shared Memory. Boost Lockfree has a Single-Producer Single-Consumer queue type (spsc_queue). This is basically what you refer to as a circular buffer. Here’s a demonstration that passes IPC messages (in this case, of type string) using this queue, in a lock-free fashion. Defining the types First, let’s define our types: … Read more

Lock-free Progress Guarantees in a circular buffer queue

This queue data structure is not strictly lock-free by what I consider the most reasonable definition. That definition is something like: A structure is lock-free if only if any thread can be indefinitely suspended at any point while still leaving the structure usable by the remaining threads. Of course this implies a suitable definition of … Read more