Defined in header hpx/threading_base/thread_description.hpp.

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

namespace hpx
namespace threads


std::ostream &operator<<(std::ostream&, thread_description const&)#
std::string as_string(thread_description const &desc)#
threads::thread_description get_thread_description(thread_id_type const &id, error_code &ec = throws)#

The function get_thread_description is part of the thread related API allows to query the description of one of the threads known to the thread-manager.


As long as ec is not pre-initialized to hpx::throws this function doesn’t throw but returns the result code using the parameter ec. Otherwise it throws an instance of hpx::exception.

  • id – [in] The thread id of the thread being queried.

  • ec – [in,out] this represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.


This function returns the description of the thread referenced by the id parameter. If the thread is not known to the thread-manager the return value will be the string “<unknown>”.

threads::thread_description set_thread_description(thread_id_type const &id, threads::thread_description const &desc = threads::thread_description(), error_code &ec = throws)#
threads::thread_description get_thread_lco_description(thread_id_type const &id, error_code &ec = throws)#
threads::thread_description set_thread_lco_description(thread_id_type const &id, threads::thread_description const &desc = threads::thread_description(), error_code &ec = throws)#
struct thread_description#

Public Types

enum data_type#


enumerator data_type_description#
enumerator data_type_address#

Public Functions

thread_description() noexcept = default#
inline constexpr thread_description(char const*) noexcept#
inline explicit constexpr thread_description(std::string const&) noexcept#
template<typename F, typename = std::enable_if_t<!std::is_same_v<F, thread_description> && !traits::is_action_v<F>>>
inline explicit constexpr thread_description(F const&, char const* = nullptr) noexcept#
template<typename Action, typename = std::enable_if_t<traits::is_action_v<Action>>>
inline explicit constexpr thread_description(Action, char const* = nullptr) noexcept#
inline explicit constexpr operator bool() const noexcept#

Public Static Functions

static inline constexpr data_type kind() noexcept#
static inline constexpr char const *get_description() noexcept#
static inline constexpr std::size_t get_address() noexcept#
static inline constexpr bool valid() noexcept#

Private Functions

void init_from_alternative_name(char const *altname)#
namespace util