Jump to content
View in the app

A better way to browse. Learn more.

Horizon Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

CppCon 2025 Building Robust Inter-Process Queues in C++ -- Jody Hagins

Featured Replies

avatar.jpg?aadRegistration is now open for CppCon 2025! The conference starts on September 13 and will be held in person in Aurora, CO. To whet your appetite for this year’s conference, we’re posting some upcoming talks that you will be able to attend this year. Here’s another CppCon future talk we hope you will enjoy – and register today for CppCon 2025!

Building Robust Inter-Process Queues in C++

Monday, September 15 14:00 - 15:00 MDT

by Jody Hagins

Summary of the talk:

This talk will offer design and implementation details of a queue intended to be used between multiple processes.

The C++ standard was written with a single-process worldview, mentioning processes only once—in a note stating that lock-free atomic operations work across process boundaries. This has led to widespread but incorrect advice about using std::atomic in shared memory. When moving queue implementations from threads to processes, seemingly rock-solid code can induce undefined behavior.

In addition, traditional queue interfaces are fundamentally insufficient for cross-process communication. A properly designed inter-process queue API must enforce role separation, ensuring that a process can only perform operations appropriate to its designated role. For example, a producer process should not be able to consume messages or manage the queue itself, and the API should prevent multiple processes from accidentally assuming the same role in a single-producer design.

By the end of this talk, you will understand the fundamental differences between thread process synchronization, how to design proper interfaces for interprocess queues that enforce correct usage across process boundaries, and practical techniques to ensure your cross-process code works reliably in production environments.

Oh yeah, and you will have a full implementation that you can use and improve upon.


Jody Hagins has been using C++ for the better part of four decades. He remains amazed at how much he does not know after all those years. He has spent most of that time designing and building systems in C++, for use in the high frequency trading space.

View the full article

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.