hpx/threading/jthread.hpp

See Public API for a list of names and headers that are part of the public HPX API.

namespace hpx

Functions

void swap(jthread &lhs, jthread &rhs)
class jthread

Public Types

using id = thread::id
using native_handle_type = thread::native_handle_type

Public Functions

jthread()
template<typename F, typename ...Ts, typename Enable = typename std::enable_if<!std::is_same<typename std::decay<F>::type, jthread>::value>::type>
jthread(F &&f, Ts&&... ts)
~jthread()
jthread(jthread const&)
jthread(jthread &&x)
jthread &operator=(jthread const&)
jthread &operator=(jthread&&)
void swap(jthread &t)
bool joinable() const
void join()
void detach()
id get_id() const
native_handle_type native_handle()
stop_source get_stop_source()
stop_token get_stop_token() const
bool request_stop()

Public Static Functions

static unsigned int hardware_concurrency()

Private Members

stop_source ssource_
hpx::thread thread_ = {}

Private Static Functions

template<typename F, typename ...Ts>
static void invoke(std::false_type, F &&f, stop_token&&, Ts&&... ts)
template<typename F, typename ...Ts>
static void invoke(std::true_type, F &&f, stop_token &&st, Ts&&... ts)