Skip to content

Instantly share code, notes, and snippets.

Avatar
:shipit:

Lucas C. lc0305

:shipit:
View GitHub Profile
@lc0305
lc0305 / spsc_ring.hpp
Last active Mar 14, 2021
Lock-Free SPSC Ring Buffer
View spsc_ring.hpp
#ifndef __SPSC_RING_H__
#define __SPSC_RING_H__
/**
* Basically Herlihy's WaitFreeQueue<T> in modern CPP
* Author: Lucas Crämer
* */
#include <array>
#include <atomic>
@lc0305
lc0305 / mpmc_ring.hpp
Last active Mar 14, 2021
Lock-Free MPMC Ring Buffer
View mpmc_ring.hpp
#ifndef __MPMC_RING_H__
#define __MPMC_RING_H__
/**
* Inspired by 'An Interesting Lock-free Queue'
* Talk by Tony Van Eerd at the CppCon 2017:
* https://www.youtube.com/watch?v=HP2InVqgBFM
* Author: Lucas Crämer
* */