YACLib
C++ library for concurrent tasks execution
Loading...
Searching...
No Matches
yaclib::detail::fiber::Thread Class Reference

#include <thread.hpp>

Public Types

using id = FiberBase::Id
 
using native_handle_type = void *
 

Public Member Functions

 Thread (const Thread &)=delete
 
Threadoperator= (const Thread &)=delete
 
template<typename... Args>
 Thread (Args &&... args)
 
 Thread () noexcept
 
 Thread (Thread &&t) noexcept
 
Threadoperator= (Thread &&t) noexcept
 
 ~Thread ()
 
void swap (Thread &t) noexcept
 
bool joinable () const noexcept
 
void join ()
 
void detach ()
 
id get_id () const noexcept
 
native_handle_type native_handle () noexcept
 

Static Public Member Functions

static unsigned int hardware_concurrency () noexcept
 
static void SetHardwareConcurrency (unsigned int hardware_concurrency) noexcept
 

Detailed Description

Definition at line 13 of file thread.hpp.

Member Typedef Documentation

◆ id

◆ native_handle_type

Constructor & Destructor Documentation

◆ Thread() [1/4]

yaclib::detail::fiber::Thread::Thread ( const Thread )
delete

◆ Thread() [2/4]

template<typename... Args>
yaclib::detail::fiber::Thread::Thread ( Args &&...  args)
inlineexplicit

◆ Thread() [3/4]

yaclib::detail::fiber::Thread::Thread ( )
defaultnoexcept

◆ Thread() [4/4]

yaclib::detail::fiber::Thread::Thread ( Thread &&  t)
noexcept

Definition at line 72 of file thread.cpp.

References yaclib::MakeContract().

◆ ~Thread()

yaclib::detail::fiber::Thread::~Thread ( )

Definition at line 61 of file thread.cpp.

Member Function Documentation

◆ detach()

void yaclib::detail::fiber::Thread::detach ( )

Definition at line 38 of file thread.cpp.

References joinable().

◆ get_id()

FiberBase::Id yaclib::detail::fiber::Thread::get_id ( ) const
noexcept

Definition at line 48 of file thread.cpp.

References yaclib::detail::fiber::FiberBase::GetId().

Referenced by joinable().

◆ hardware_concurrency()

unsigned int yaclib::detail::fiber::Thread::hardware_concurrency ( )
staticnoexcept

Definition at line 57 of file thread.cpp.

References yaclib::detail::fiber::gHardwareConcurrency.

◆ join()

◆ joinable()

bool yaclib::detail::fiber::Thread::joinable ( ) const
noexcept

Definition at line 18 of file thread.cpp.

References get_id(), and yaclib::fault::Scheduler::GetId().

Referenced by detach(), and join().

◆ native_handle()

Thread::native_handle_type yaclib::detail::fiber::Thread::native_handle ( )
noexcept

Definition at line 52 of file thread.cpp.

References YACLIB_DEBUG.

◆ operator=() [1/2]

Thread & yaclib::detail::fiber::Thread::operator= ( const Thread )
delete

◆ operator=() [2/2]

Thread & yaclib::detail::fiber::Thread::operator= ( Thread &&  t)
noexcept

Definition at line 67 of file thread.cpp.

References yaclib::MakeContract().

◆ SetHardwareConcurrency()

void yaclib::detail::fiber::Thread::SetHardwareConcurrency ( unsigned int  hardware_concurrency)
staticnoexcept

◆ swap()

void yaclib::detail::fiber::Thread::swap ( Thread t)
noexcept

Definition at line 14 of file thread.cpp.

References yaclib::MakeContract().


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