libstdc++
Collaboration diagram for Threads:

Namespaces

namespace  std::this_thread
 

Classes

struct  std::hash< thread::id >
 
class  std::thread
 
class  std::thread::id
 

Typedefs

using std::thread::_Invoker< _Tuple >::_Indices = typename _Build_index_tuple< tuple_size< _Tuple >::value >::__type
 
using std::thread::_State_ptr = unique_ptr< _State >
 
typedef __gthread_t std::thread::native_handle_type
 

Functions

 std::thread::_State_impl< _Callable >::_State_impl (_Callable &&__f)
 
 std::thread::id::id (native_handle_type __id)
 
template<typename _Callable , typename... _Args>
 std::thread::thread (_Callable &&__f, _Args &&... __args)
 
 std::thread::thread (const thread &&)=delete
 
 std::thread::thread (const thread &)=delete
 
 std::thread::thread (thread &&__t) noexcept
 
 std::thread::thread (thread &)=delete
 
template<typename _Callable , typename... _Args>
static _Invoker< __decayed_tuple< _Callable, _Args... > > std::thread::__make_invoker (_Callable &&__callable, _Args &&... __args)
 
void std::this_thread::__sleep_for (chrono::seconds, chrono::nanoseconds)
 
template<size_t... _Ind>
auto std::thread::_Invoker< _Tuple >::_M_invoke (_Index_tuple< _Ind... >) noexcept(noexcept(std::__invoke(_S_declval< _Ind >()...))) -> decltype(std::__invoke(_S_declval< _Ind >()...))
 
void std::thread::_State_impl< _Callable >::_M_run ()
 
virtual void std::thread::_State::_M_run ()=0
 
template<size_t _Index>
static __tuple_element_t< _Index, _Tuple > && std::thread::_Invoker< _Tuple >::_S_declval ()
 
void std::thread::detach ()
 
thread::id std::thread::get_id () const noexcept
 
thread::id std::this_thread::get_id () noexcept
 
static unsigned int std::thread::hardware_concurrency () noexcept
 
void std::thread::join ()
 
bool std::thread::joinable () const noexcept
 
native_handle_type std::thread::native_handle ()
 
bool std::operator!= (thread::id __x, thread::id __y) noexcept
 
auto std::thread::_Invoker< _Tuple >::operator() () noexcept(noexcept(std::declval< _Invoker & >()._M_invoke(_Indices()))) -> decltype(std::declval< _Invoker & >()._M_invoke(_Indices()))
 
size_t std::hash< thread::id >::operator() (const thread::id &__id) const noexcept
 
bool std::operator< (thread::id __x, thread::id __y) noexcept
 
template<class _CharT , class _Traits >
basic_ostream< _CharT, _Traits > & std::operator<< (basic_ostream< _CharT, _Traits > &__out, thread::id __id)
 
bool std::operator<= (thread::id __x, thread::id __y) noexcept
 
threadstd::thread::operator= (const thread &)=delete
 
threadstd::thread::operator= (thread &&__t) noexcept
 
bool std::operator== (thread::id __x, thread::id __y) noexcept
 
bool std::operator> (thread::id __x, thread::id __y) noexcept
 
bool std::operator>= (thread::id __x, thread::id __y) noexcept
 
template<typename _Rep , typename _Period >
void std::this_thread::sleep_for (const chrono::duration< _Rep, _Period > &__rtime)
 
template<typename _Clock , typename _Duration >
void std::this_thread::sleep_until (const chrono::time_point< _Clock, _Duration > &__atime)
 
void std::thread::swap (thread &__t) noexcept
 
void std::swap (thread &__x, thread &__y) noexcept
 
void std::this_thread::yield () noexcept
 

Variables

_Callable std::thread::_State_impl< _Callable >::_M_func
 
_Tuple std::thread::_Invoker< _Tuple >::_M_t
 

Friends

class std::thread::id::hash< thread::id >
 
bool std::thread::id::operator< (thread::id __x, thread::id __y) noexcept
 
template<class _CharT , class _Traits >
basic_ostream< _CharT, _Traits > & std::thread::id::operator<< (basic_ostream< _CharT, _Traits > &__out, thread::id __id)
 
bool std::thread::id::operator== (thread::id __x, thread::id __y) noexcept
 
class std::thread::id::thread
 

Detailed Description

Classes for thread support.

Typedef Documentation

◆ _Indices

template<typename _Tuple >
using std::thread::_Invoker< _Tuple >::_Indices = typename _Build_index_tuple<tuple_size<_Tuple>::value>::__type

Definition at line 236 of file thread.

◆ _State_ptr

Definition at line 72 of file thread.

◆ native_handle_type

typedef __gthread_t std::thread::native_handle_type

Definition at line 74 of file thread.

Function Documentation

◆ _State_impl()

template<typename _Callable >
std::thread::_State_impl< _Callable >::_State_impl ( _Callable &&  __f)
inline

Definition at line 182 of file thread.

◆ id() [1/2]

std::thread::id::id ( )
inlinenoexcept

Definition at line 82 of file thread.

◆ id() [2/2]

std::thread::id::id ( native_handle_type  __id)
inlineexplicit

Definition at line 85 of file thread.

◆ thread() [1/2]

template<typename _Callable , typename... _Args>
std::thread::thread ( _Callable &&  __f,
_Args &&...  __args 
)
inlineexplicit

Definition at line 118 of file thread.

◆ thread() [2/2]

std::thread::thread ( thread &&  __t)
inlinenoexcept

Definition at line 113 of file thread.

◆ ~thread()

std::thread::~thread ( )
inline

Definition at line 132 of file thread.

◆ __make_invoker()

template<typename _Callable , typename... _Args>
static _Invoker< __decayed_tuple< _Callable, _Args... > > std::thread::__make_invoker ( _Callable &&  __callable,
_Args &&...  __args 
)
inlinestatic

Definition at line 254 of file thread.

◆ _M_invoke()

template<typename _Tuple >
template<size_t... _Ind>
auto std::thread::_Invoker< _Tuple >::_M_invoke ( _Index_tuple< _Ind... >  ) -> decltype(std::__invoke(_S_declval<_Ind>()...))
inlinenoexcept

Definition at line 231 of file thread.

◆ _M_run()

template<typename _Callable >
void std::thread::_State_impl< _Callable >::_M_run ( )
inline

Definition at line 186 of file thread.

◆ get_id() [1/2]

thread::id std::thread::get_id ( ) const
inlinenoexcept

Definition at line 163 of file thread.

◆ get_id() [2/2]

thread::id std::this_thread::get_id ( )
inlinenoexcept

get_id

Definition at line 333 of file thread.

◆ joinable()

bool std::thread::joinable ( ) const
inlinenoexcept

Definition at line 153 of file thread.

◆ native_handle()

native_handle_type std::thread::native_handle ( )
inline
Precondition
thread is joinable

Definition at line 169 of file thread.

◆ operator!=()

bool std::operator!= ( thread::id  __x,
thread::id  __y 
)
inlinenoexcept

Definition at line 277 of file thread.

◆ operator()() [1/2]

template<typename _Tuple >
auto std::thread::_Invoker< _Tuple >::operator() ( ) -> decltype(std::declval<_Invoker&>()._M_invoke(_Indices()))
inlinenoexcept

Definition at line 240 of file thread.

◆ operator()() [2/2]

size_t std::hash< thread::id >::operator() ( const thread::id __id) const
inlinenoexcept

Definition at line 307 of file thread.

◆ operator<()

bool std::operator< ( thread::id  __x,
thread::id  __y 
)
inlinenoexcept

Definition at line 280 of file thread.

◆ operator<<()

template<class _CharT , class _Traits >
basic_ostream< _CharT, _Traits > & std::operator<< ( basic_ostream< _CharT, _Traits > &  __out,
thread::id  __id 
)
inline

Definition at line 297 of file thread.

◆ operator<=()

bool std::operator<= ( thread::id  __x,
thread::id  __y 
)
inlinenoexcept

Definition at line 288 of file thread.

◆ operator=()

thread & std::thread::operator= ( thread &&  __t)
inlinenoexcept

Definition at line 140 of file thread.

◆ operator==()

bool std::operator== ( thread::id  __x,
thread::id  __y 
)
inlinenoexcept

Definition at line 267 of file thread.

◆ operator>()

bool std::operator> ( thread::id  __x,
thread::id  __y 
)
inlinenoexcept

Definition at line 293 of file thread.

◆ operator>=()

bool std::operator>= ( thread::id  __x,
thread::id  __y 
)
inlinenoexcept

Definition at line 297 of file thread.

◆ sleep_for()

template<typename _Rep , typename _Period >
void std::this_thread::sleep_for ( const chrono::duration< _Rep, _Period > &  __rtime)
inline

sleep_for

Definition at line 361 of file thread.

◆ sleep_until()

template<typename _Clock , typename _Duration >
void std::this_thread::sleep_until ( const chrono::time_point< _Clock, _Duration > &  __atime)
inline

sleep_until

Definition at line 383 of file thread.

◆ swap() [1/2]

void std::thread::swap ( thread __t)
inlinenoexcept

Definition at line 149 of file thread.

◆ swap() [2/2]

void std::swap ( thread __x,
thread __y 
)
inlinenoexcept

Definition at line 263 of file thread.

◆ yield()

void std::this_thread::yield ( )
inlinenoexcept

yield

Definition at line 348 of file thread.

Variable Documentation

◆ _M_func

template<typename _Callable >
_Callable std::thread::_State_impl< _Callable >::_M_func

Definition at line 180 of file thread.

◆ _M_t

template<typename _Tuple >
_Tuple std::thread::_Invoker< _Tuple >::_M_t

Definition at line 223 of file thread.

Friends

◆ hash< thread::id >

friend class hash< thread::id >
friend

Definition at line 88 of file thread.

◆ operator<

bool operator< ( thread::id  __x,
thread::id  __y 
)
friend

Definition at line 280 of file thread.

◆ operator<<

template<class _CharT , class _Traits >
basic_ostream< _CharT, _Traits > & operator<< ( basic_ostream< _CharT, _Traits > &  __out,
thread::id  __id 
)
friend

Definition at line 297 of file thread.

◆ operator==

bool operator== ( thread::id  __x,
thread::id  __y 
)
friend

Definition at line 267 of file thread.

◆ thread

friend class thread
friend

Definition at line 88 of file thread.