hpx/runtime_distributed/server/runtime_support.hpp#

Defined in header hpx/runtime_distributed/server/runtime_support.hpp.

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

namespace hpx
namespace components
namespace server
class runtime_support#

Public Types

typedef runtime_support type_holder#

Public Functions

explicit runtime_support(hpx::util::runtime_configuration &cfg)#
inline ~runtime_support()#
void delete_function_lists()#
void tidy()#
template<typename Component>
naming::gid_type create_component()#

Actions to create new objects.

template<typename Component, typename T, typename ...Ts>
naming::gid_type create_component(T v, Ts... vs)#
template<typename Component>
std::vector<naming::gid_type> bulk_create_component(std::size_t count)#
template<typename Component, typename T, typename ...Ts>
std::vector<naming::gid_type> bulk_create_component(std::size_t count, T v, Ts... vs)#
template<typename Component>
naming::gid_type copy_create_component(std::shared_ptr<Component> const &p, bool)#
template<typename Component>
naming::gid_type migrate_component_to_here(std::shared_ptr<Component> const &p, hpx::id_type)#
void shutdown(double timeout, hpx::id_type const &respond_to)#

Gracefully shutdown this runtime system instance.

void shutdown_all(double timeout)#

Gracefully shutdown runtime system instances on all localities.

void terminate(hpx::id_type const &respond_to)#

Shutdown this runtime system instance.

inline void terminate_act(hpx::id_type const &id)#
void terminate_all()#

Shutdown runtime system instances on all localities.

inline void terminate_all_act()#
util::section get_config()#

Retrieve configuration information.

int load_components()#

Load all components on this locality.

void call_startup_functions(bool pre_startup)#
void call_shutdown_functions(bool pre_shutdown)#
void garbage_collect()#

Force a garbage collection operation in the AGAS layer.

naming::gid_type create_performance_counter(performance_counters::counter_info const &info)#

Create the given performance counter instance.

void remove_from_connection_cache(naming::gid_type const &gid, parcelset::endpoints_type const &eps)#

Remove the given locality from our connection cache.

HPX_DEFINE_COMPONENT_ACTION (runtime_support, terminate_act, terminate_action) HPX_DEFINE_COMPONENT_ACTION(runtime_support

termination detection

terminate_all_action HPX_DEFINE_COMPONENT_ACTION (runtime_support, remove_from_connection_cache) void run()

Start the runtime_support component.

void wait()#

Wait for the runtime_support component to notify the calling thread.

This function will be called from the main thread, causing it to block while the HPX functionality is executed. The main thread will block until the shutdown_action is executed, which in turn notifies all waiting threads.

void stop(double timeout, hpx::id_type const &respond_to, bool remove_from_remote_caches)#

Notify all waiting (blocking) threads allowing the system to be properly stopped.

Note

This function can be called from any thread.

void stopped()#

called locally only

void notify_waiting_main()#
inline bool was_stopped() const#
void add_pre_startup_function(startup_function_type f)#
void add_startup_function(startup_function_type f)#
void add_pre_shutdown_function(shutdown_function_type f)#
void add_shutdown_function(shutdown_function_type f)#
void remove_here_from_connection_cache()#
void remove_here_from_console_connection_cache()#

Public Members

terminate_all_act

Public Static Functions

static inline component_type get_component_type()#
static inline void set_component_type(component_type t)#
static inline constexpr void finalize()#

finalize() will be called just before the instance gets destructed

static inline bool is_target_valid(hpx::id_type const &id)#

Protected Functions

int load_components(util::section &ini, naming::gid_type const &prefix, naming::resolver_client &agas_client, hpx::program_options::options_description &options, std::set<std::string> &startup_handled)#
bool load_component(hpx::util::plugin::dll &d, util::section &ini, std::string const &instance, std::string const &component, filesystem::path const &lib, naming::gid_type const &prefix, naming::resolver_client &agas_client, bool isdefault, bool isenabled, hpx::program_options::options_description &options, std::set<std::string> &startup_handled)#
bool load_component_dynamic(util::section &ini, std::string const &instance, std::string const &component, filesystem::path lib, naming::gid_type const &prefix, naming::resolver_client &agas_client, bool isdefault, bool isenabled, hpx::program_options::options_description &options, std::set<std::string> &startup_handled)#
bool load_startup_shutdown_functions(hpx::util::plugin::dll &d, error_code &ec)#
bool load_commandline_options(hpx::util::plugin::dll &d, hpx::program_options::options_description &options, error_code &ec)#
bool load_component_static(util::section &ini, std::string const &instance, std::string const &component, filesystem::path const &lib, naming::gid_type const &prefix, naming::resolver_client &agas_client, bool isdefault, bool isenabled, hpx::program_options::options_description &options, std::set<std::string> &startup_handled)#
bool load_startup_shutdown_functions_static(std::string const &mod, error_code &ec)#
bool load_commandline_options_static(std::string const &mod, hpx::program_options::options_description &options, error_code &ec)#
bool load_plugins(util::section &ini, hpx::program_options::options_description &options, std::set<std::string> &startup_handled)#
bool load_plugin(hpx::util::plugin::dll &d, util::section &ini, std::string const &instance, std::string const &component, filesystem::path const &lib, bool isenabled, hpx::program_options::options_description &options, std::set<std::string> &startup_handled)#
bool load_plugin_dynamic(util::section &ini, std::string const &instance, std::string const &component, filesystem::path lib, bool isenabled, hpx::program_options::options_description &options, std::set<std::string> &startup_handled)#
std::size_t dijkstra_termination_detection(std::vector<hpx::id_type> const &locality_ids)#

Private Types

typedef hpx::spinlock plugin_map_mutex_type#
typedef plugin_factory plugin_factory_type#
typedef std::map<std::string, plugin_factory_type> plugin_map_type#
typedef std::map<std::string, hpx::util::plugin::dll> modules_map_type#
typedef std::vector<static_factory_load_data_type> static_modules_type#

Private Members

std::mutex mtx_#
std::condition_variable wait_condition_#
std::condition_variable stop_condition_#
bool stop_called_#
bool stop_done_#
bool terminated_#
std::thread::id main_thread_id_#
std::atomic<bool> shutdown_all_invoked_#
plugin_map_mutex_type p_mtx_#
plugin_map_type plugins_#
modules_map_type &modules_#
static_modules_type static_modules_#
hpx::spinlock globals_mtx_#
std::list<startup_function_type> pre_startup_functions_#
std::list<startup_function_type> startup_functions_#
std::list<shutdown_function_type> pre_shutdown_functions_#
std::list<shutdown_function_type> shutdown_functions_#
struct plugin_factory#

Public Functions

inline plugin_factory(std::shared_ptr<plugins::plugin_factory_base> const &f, hpx::util::plugin::dll const &d, bool enabled)#

Public Members

std::shared_ptr<plugins::plugin_factory_base> first#
hpx::util::plugin::dll const &second#
bool isenabled#