Skip to content

C++ class for a joining and cooperative interruptible thread (created to become std::jthread)

License

Notifications You must be signed in to change notification settings

StirlingLabs/jthread

 
 

Repository files navigation

jthread

CC BY 4.0 jthread

C++ class for a joining and cooperative interruptible thread (std::jthread) with stop_token helper:

  • Reference implementation, cleaned up to be used as a polyfill on Mac until libc++ gets an official implementation
  • Test suite
  • Papers proposing it for the C++ standard

Main authors: Nicolai Josuttis (http://www.josuttis.com/contact.html) and Lewis Baker

⚠️ Note

  • Tests for condition variable are not run in CI because this implementation does not work in a single-core environment. We recommend that you do not use CV from this repo until tests are run and passing.
  • The code is licensed under a Creative Commons Attribution 4.0 International License.

🗒️ Contents

  • include/
    • headers that can be included as an implementation in other projects (e.g. to polyfill Clang).
      • note attribution requirements under license
  • source/
    • source code for the reference implementation and the test suite
      • to test the CV class extensions they are applied to a class condition_variable_any2
  • tex/
    • final paper and proposed wording using C++ standard LaTeX style
      • to create the latest version: pdflatex std
  • doc/
    • current and old documentations (all proposals P0660*.pdf)

About

C++ class for a joining and cooperative interruptible thread (created to become std::jthread)

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • TeX 69.8%
  • C++ 27.6%
  • Makefile 1.4%
  • CMake 1.2%