Need help with cs_libguarded?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

165 Stars 18 Forks BSD 2-Clause "Simplified" License 78 Commits 1 Opened issues


Header-only library for multithreaded programming

Services available


Need anything else?

Contributors list



The CsLibGuarded library is a standalone header only library for multithreaded programming.

This library provides templated classes which prevent race conditions by controlling access to shared data. Existing multithreading primitives like mutexes and locks are only bound to the protected data by conventions. This makes it very easy to introduce bugs in your code by forgetting to use the right locks before accessing a block of data. The idea of this library is to tie the data and the locks in a type safe interface that only allows correct usage.

System Requirements

To use CsLibGuarded you will need a C++17 compiler which fully supports the C++17 standard library.

CMake is only for building and running the unit test suite. This library has been tested with clang thread sanitizer, multiple code reviews, and production software.


Class level documentation for CsLibGuarded is available on the CopperSpice website:


Our YouTube channel contains videos about modern C++, graphics, build systems, CopperSpice, DoxyPress, and other topics related to software development.

Multiple videos discussing CsLibGuarded and multithreading can be found on the following page:

Authors / Contributors

  • Ansel Sermersheim
  • Barbara Geller
  • Casey Bodley
  • Jan Wilmans
  • Eric Lemanissier


This library is released under the BSD 2-clause license. For more information refer to the LICENSE file provided with this project.


We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.