rcu_ptr
rcu_ptr copied to clipboard
A special smart pointer to exchange data between threads
`std::atomic` has been [specialized for `std::shared_ptr` in C++20](https://en.cppreference.com/w/cpp/memory/shared_ptr/atomic2). Using the `std::atomic_*` function instead causes a compiler warning at least on MSVC for C++ 20. Theoretically one could choose which ASP...
Create a test framework, where we can synthesize different random thread interleavings and if there is an error, then at least we should be able to display the interleaving which...
This idea comes from crimson-virtue. In `ExecuteInLoop.hpp` instead of relying on **asm**("") we could use an atomic ready flag with relaxed load and store. In `RandomWait::operator()` we would have a...
From http://preshing.com/20150402/you-can-do-any-kind-of-atomic-read-modify-write-operation/ > Suppose thread A has to do a bunch of extra work in the "modify" step for some reason, such that one of threads B, C, ... has...
Use rcu_ptr with a preallocated block. Something like rcu_ptr , where N states how many instances can be put on the preallocated storage. TBD: What to do when the storage...
We expect better performance on this (because no heap usage), but less flexibility.