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

Functions

util::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.

Return

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>”.

Note

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.

Parameters
  • 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.

util::thread_description set_thread_description(thread_id_type const &id, util::thread_description const &desc = util::thread_description(), error_code &ec = throws)
util::thread_description get_thread_lco_description(thread_id_type const &id, error_code &ec = throws)
util::thread_description set_thread_lco_description(thread_id_type const &id, util::thread_description const &desc = util::thread_description(), error_code &ec = throws)
namespace util

Functions

std::ostream &operator<<(std::ostream&, thread_description const&)
std::string as_string(thread_description const &desc)
struct thread_description

Public Types

enum data_type

Values:

data_type_description = 0
data_type_address = 1

Public Functions

thread_description()
constexpr thread_description(char const*)
template<typename F, typename = typename std::enable_if<!std::is_same<F, thread_description>::value && !traits::is_action<F>::value>::type>
constexpr thread_description(F const&, char const* = nullptr)
template<typename Action, typename = typename std::enable_if<traits::is_action<Action>::value>::type>
constexpr thread_description(Action, char const* = nullptr)
constexpr data_type kind() const
constexpr char const *get_description() const
constexpr std::size_t get_address() const
constexpr operator bool() const
constexpr bool valid() const

Private Functions

void init_from_alternative_name(char const *altname)