|
guts
|
Small compatibility wrapper providing a jthread-like type. More...
#include <thread>
Go to the source code of this file.
Data Structures | |
| class | jthread_alias |
| Fallback RAII "join-on-destruction" thread wrapper. More... | |
This header defines jthread_alias, which maps to:
std::jthread when the standard library provides it (C++20 and library support), orstd::thread that joins on destruction otherwise.The fallback is intentionally small and conservative: it provides only the subset of functionality used by the project. The intent is to avoid sprinkling conditional compilation throughout the codebase while still getting safe thread joining semantics.
Key contract for the fallback:
std::thread subset that is needed (join, detach, id, native handle, swap). Definition in file gthreads.h.