Silicon Valley Code Camp : October 11th and 12th 2014session
MTUT: A C++ Framework for Cross-Thread Unit Testing
I present a C++ framework for modeling interactions between threads in a single thread's sequence, as an extension to existing C++ unit test frameworks, such as boost.Test or googletest.
About This Session
It is often useful to model concurrent interactions for a single class or construct that supports concurrent or reentrant access as a multi-threaded sequence diagram. It would be very useful to be able to express the same sequential representation in a unit test, with the operations in different threads defined in the same flow.
I present a framework for doing this. It ships lambda expressions to any number of locally initialized threads, synchronizing, or optionally randomizing, the start times of each thread's block of code, and providing mechanisms to check in an assertion (for example) whether two or more threads are deadlocked or livelocked, whether a point of execution was reached while it was expected to be protected, and other such violations of concurrency expectations. Mechanisms are also provided for looping and timing.
Nathan Yospe is a professional developer with a primary focus on algorithms, libraries, and infrastructure, predominantly in C++. He works for SAP Labs, and his team is currently developing a highly distributed database.