10 ms·
This is great, is there a "loom" like library for C++? I have a set of lock-free data structures that I would like to test.
by idle_cycles 2y ago
This is great, is there a "loom" like library for C++?
I have a set of lock-free data structures that I would like to test.
- ot 2y agoFolly has DeterministicSchedule, which also wraps atomics and it is used to test its core synchronization primitives, but I don't think it's as sophisticated as loom. https://github.com/facebook/folly/blob/main/folly/test/DeterministicSchedule.h https://github.com/facebook/folly/blob/main/folly/test/Deter...
- int08h 2y agoYes, the (IMHO) the easiest one to use is the Relacy Race Detector (https://github.com/dvyukov/relacy https://github.com/dvyukov/relacy and https://www.1024cores.net/home/relacy-race-detector https://www.1024cores.net/home/relacy-race-detector) It's been around a while and is easy to work with. Written by Dmitry Vyukov, an expert in the concurrency world.
- JonChesterfield 2y agoRelacy is notable for being the only one in c++ that knows what a fence is, at least last time I looked. It told me a structure might not make forward progress on some thread interleaving. I.e. if only one thread ever runs, the others don't do anything. That's true but uninformative. I wasn't able to coax it into using a vaguely fair scheduler to get more useful information out than that.
- a_t48 2y ago32 bit only, no clang support :(
- anacrolix 2y agoI think he implemented this inside Go
- wqeqweewq 2y agohttps://plv.mpi-sws.org/genmc/ https://plv.mpi-sws.org/genmc/