~/talk

Building Robust Inter-Process Queues in C++

Talkat C++ on Sea 2025 · 2025-06-23..06-25· [c-and-cpp, concurrency]
links:none on file
slides:none on file

Examines two popular SPSC queues (Daugaard, Rigtorp) and shows that simply mmap-ing them breaks: std::atomic is not an implicit-lifetime type in C++20, placement-newed objects and internal pointers require explicit reinitialization, and user-defined constructors make shared-memory instances undefined. Proposes a separated design: a metadata-backed queue that enforces single-producer/single-consumer ownership, reattach reader/writer pointers on process attach, and a robust process lock using PID+start-time plus an optional MCAST special-consumer for non-blocking broadcasts.

AI-written summary · about

  1. 0:00Introduction
  2. 5:01Inter-process queues requirements
  3. 10:27Dow Guard ring buffer
  4. 21:44Cross-process queue challenges
  5. 33:36Undefined behavior in queues
  6. 44:12C++20 lifetime types
  7. 52:39Cache line alignment
  8. 54:07Separation of concerns
  9. 1:01:17MCAST queues production
  10. 1:06:15Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.