hpx::startup_function_type, hpx::register_pre_startup_function, hpx::register_startup_function#

Defined in header hpx/runtime.hpp.

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

namespace hpx

Typedefs

using startup_function_type = hpx::move_only_function<void()>#

The type of the function which is registered to be executed as a startup or pre-startup function.

Functions

void register_pre_startup_function(startup_function_type f)#

Add a function to be executed by a HPX thread before hpx_main but guaranteed before any startup function is executed (system-wide).

Any of the functions registered with register_pre_startup_function are guaranteed to be executed by an HPX thread before any of the registered startup functions are executed (see hpx::register_startup_function()).

This function is one of the few API functions which can be called before the runtime system has been fully initialized. It will automatically stage the provided startup function to the runtime system during its initialization (if necessary).

Note

If this function is called while the pre-startup functions are being executed or after that point, it will raise aninvalid_status exception.

Parameters

f – [in] The function to be registered to run by an HPX thread as a pre-startup function.

void register_startup_function(startup_function_type f)#

Add a function to be executed by a HPX thread before hpx_main but guaranteed after any pre-startup function is executed (system-wide).

Any of the functions registered with register_startup_function are guaranteed to be executed by an HPX thread after any of the registered pre-startup functions are executed (see: hpx::register_pre_startup_function()), but before hpx_main is being called.

This function is one of the few API functions which can be called before the runtime system has been fully initialized. It will automatically stage the provided startup function to the runtime system during its initialization (if necessary).

Note

If this function is called while the startup functions are being executed or after that point, it will raise an invalid_status exception.

Parameters

f – [in] The function to be registered to run by an HPX thread as a startup function.