HPX - High Performance ParalleX

PrevUpHomeNext

Function register_startup_function

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

Synopsis

// In header: <hpx/hpx_fwd.hpp>


void register_startup_function(startup_function_type const & f);

Description

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.

[Note] Note

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

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

See Also:

hpx::register_pre_startup_function()

Parameters:

f

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


PrevUpHomeNext