SkillAgentSearch skills...

ThreadingTest

Sample code to accompany a blog post (see README)

Install / Use

/learn @andrewstephens75/ThreadingTest
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

ThreadingTest

A simple test program to show examples of different ways to create a threadsafe datastructure. Three different strategies are used on the same datastructure to compare performance.

The complete write-up and explanation is in this blog post: Safety and Performance - Threadsafe Datastructures in C++.

Building

ThreadingTest is a single C++ and should be easy enough to build with any compiler. It requires C++17 support for the shared_mutex test.

I have provided a CMakeLists.txt file for easy building via cmake:

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release  ..
cmake --build .  
./ThreadingTest
View on GitHub
GitHub Stars4
CategoryDevelopment
Updated2y ago
Forks0

Languages

C++

Security Score

60/100

Audited on Sep 11, 2023

No findings