ORIGINAL
Loading...
Searching...
No Matches
original::threadBase Class Referenceabstract

Base class for thread implementations. More...

#include <thread.h>

Inheritance diagram for original::threadBase:
Inheritance graph
Collaboration diagram for original::threadBase:
Collaboration graph

Classes

class  threadData
 Wrapper for thread execution data. More...
 

Public Member Functions

virtual ~threadBase () noexcept(false)
 Destructor.
 
 threadBase (const threadBase &)=delete
 
threadBaseoperator= (const threadBase &)=delete
 
 threadBase (threadBase &&other) noexcept=default
 
threadBaseoperator= (threadBase &&other) noexcept=default
 
 operator bool () const
 Check if thread is valid.
 
bool operator! () const
 Check if thread is not valid.
 
bool joinable () const
 Check if thread is joinable.
 

Protected Member Functions

virtual bool valid () const =0
 Check if thread is valid.
 
 threadBase (bool is_joinable=false)
 Construct thread base.
 

Protected Attributes

bool is_joinable
 

Detailed Description

Base class for thread implementations.

Provides common thread functionality and interface

Key Features:

  • Manages thread joinable state
  • Provides basic thread validity checks
  • Non-copyable but movable

Constructor & Destructor Documentation

◆ threadBase()

original::threadBase::threadBase ( bool is_joinable = false)
inlineexplicitprotected

Construct thread base.

Parameters
is_joinableWhether thread is joinable

◆ ~threadBase()

original::threadBase::~threadBase ( )
inlinevirtual

Destructor.

Exceptions
sysErrorif thread is joinable but not joined/detached

Member Function Documentation

◆ joinable()

bool original::threadBase::joinable ( ) const
inlinenodiscard

Check if thread is joinable.

Returns
true if thread is joinable

◆ operator bool()

original::threadBase::operator bool ( ) const
inlineexplicit

Check if thread is valid.

Returns
true if thread is valid

◆ operator!()

bool original::threadBase::operator! ( ) const
inline

Check if thread is not valid.

Returns
true if thread is not valid

◆ valid()

virtual bool original::threadBase::valid ( ) const
nodiscardprotectedpure virtual

Check if thread is valid.

Returns
true if thread is valid

The documentation for this class was generated from the following file: