hpx::shutdown_function_type, hpx::register_pre_shutdown_function, hpx::register_shutdown_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 shutdown_function_type = hpx::move_only_function<void()>#

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

Functions

void register_pre_shutdown_function(shutdown_function_type f)#

Add a function to be executed by a HPX thread during hpx::finalize() but guaranteed before any shutdown function is executed (system-wide)

Any of the functions registered with register_pre_shutdown_function are guaranteed to be executed by an HPX thread during the execution of hpx::finalize() before any of the registered shutdown functions are executed (see: hpx::register_shutdown_function()).

Note

If this function is called while the pre-shutdown 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 pre-shutdown function.

void register_shutdown_function(shutdown_function_type f)#

Add a function to be executed by a HPX thread during hpx::finalize() but guaranteed after any pre-shutdown function is executed (system-wide)

Any of the functions registered with register_shutdown_function are guaranteed to be executed by an HPX thread during the execution of hpx::finalize() after any of the registered pre-shutdown functions are executed (see: hpx::register_pre_shutdown_function()).

Note

If this function is called while the shutdown 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 shutdown function.