ThreadSchedule 2.0.0
Modern C++ thread management library
Loading...
Searching...
No Matches
thread_wrapper.hpp File Reference

Enhanced thread wrappers: ThreadWrapper, JThreadWrapper, and non-owning views. More...

#include "expected.hpp"
#include "scheduler_policy.hpp"
#include <optional>
#include <string>
#include <thread>
#include <dirent.h>
#include <fstream>
#include <sys/prctl.h>
#include <sys/resource.h>
#include <sys/syscall.h>
#include <unistd.h>
Include dependency graph for thread_wrapper.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  threadschedule::detail::OwningTag
 Tag type selecting owning (value) storage in ThreadStorage. More...
struct  threadschedule::detail::NonOwningTag
 Tag type selecting non-owning (pointer) storage in ThreadStorage. More...
class  threadschedule::detail::ThreadStorage< ThreadType, OwningTag >
 Owning thread storage - holds the thread object by value. More...
class  threadschedule::detail::ThreadStorage< ThreadType, NonOwningTag >
 Non-owning thread storage - holds a raw pointer to an external thread. More...
class  threadschedule::BaseThreadWrapper< ThreadType, OwnershipTag >
 Polymorphic base providing common thread management operations. More...
class  threadschedule::ThreadWrapper
 Owning wrapper around std::thread with RAII join-on-destroy semantics. More...
class  threadschedule::ThreadWrapperView
 Non-owning view over an externally managed std::thread. More...
class  threadschedule::ThreadByNameView
 Looks up an OS thread by its name via /proc and provides scheduling control. More...
class  threadschedule::ThreadInfo
 Static utility class providing hardware and scheduling introspection. More...

Namespaces

namespace  threadschedule
namespace  threadschedule::detail

Typedefs

using threadschedule::JThreadWrapper = ThreadWrapper
 Owning wrapper around std::jthread with cooperative cancellation (C++20).
using threadschedule::JThreadWrapperView = ThreadWrapperView

Detailed Description

Enhanced thread wrappers: ThreadWrapper, JThreadWrapper, and non-owning views.

Definition in file thread_wrapper.hpp.