hpx/components_base/server/migration_support.hpp#

Defined in header hpx/components_base/server/migration_support.hpp.

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

namespace hpx
namespace components
template<typename BaseComponent, typename Mutex = hpx::spinlock>
struct migration_support : public BaseComponent#
#include <migration_support.hpp>

This hook has to be inserted into the derivation chain of any component for it to support migration.

Public Types

using decorates_action = void#

Public Functions

inline migration_support()#
template<typename T, typename ...Ts, typename = std::enable_if_t<!std::is_same_v<std::decay_t<T>, migration_support>>>
inline explicit migration_support(T &&t, Ts&&... ts)#
migration_support(migration_support const&) = default#
migration_support(migration_support&&) = default#
migration_support &operator=(migration_support const&) = default#
migration_support &operator=(migration_support&&) = default#
~migration_support() = default#
inline naming::gid_type get_base_gid(naming::gid_type const &assign_gid = naming::invalid_gid) const#
inline void pin() noexcept#
inline bool unpin()#
inline std::uint32_t pin_count() const noexcept#
inline void mark_as_migrated()#
inline hpx::future<void> mark_as_migrated(hpx::id_type const &to_migrate)#
inline void unmark_as_migrated(hpx::id_type const &to_migrate)#

Public Static Functions

static inline constexpr bool supports_migration() noexcept#
static inline constexpr void on_migrated() noexcept#
template<typename F>
static inline threads::thread_function_type decorate_action(naming::address_type lva, F &&f)#
static inline std::pair<bool, components::pinned_ptr> was_object_migrated(hpx::naming::gid_type const &id, naming::address_type lva)#

Protected Functions

inline threads::thread_result_type thread_function(threads::thread_function_type &&f, components::pinned_ptr, threads::thread_restart_state state)#

Private Types

using base_type = BaseComponent#
using this_component_type = typename base_type::this_component_type#

Private Members

hpx::intrusive_ptr<detail::migration_support_data<Mutex>> data_#
hpx::promise<void> trigger_migration_#
bool started_migration_ = false#
bool was_marked_for_migration_ = false#