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.

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.

Returns

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

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:

enumerator data_type_description#
enumerator data_type_address#

Public Functions

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

Private Functions

void init_from_alternative_name(char const *altname)#