hpx/runtime_local/thread_hooks.hpp#

Defined in header hpx/runtime_local/thread_hooks.hpp.

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

namespace hpx

Functions

threads::policies::callback_notifier::on_startstop_type get_thread_on_start_func()#

Retrieve the currently installed start handler function. This is a function that will be called by HPX for each newly created thread that is made known to the runtime. HPX stores exactly one such function reference, thus the caller needs to make sure any newly registered start function chains into the previous one (see register_thread_on_start_func).

Note

This function can be called before the HPX runtime is initialized.

Returns

The currently installed error handler function.

threads::policies::callback_notifier::on_startstop_type get_thread_on_stop_func()#

Retrieve the currently installed stop handler function. This is a function that will be called by HPX for each newly created thread that is made known to the runtime. HPX stores exactly one such function reference, thus the caller needs to make sure any newly registered stop function chains into the previous one (see register_thread_on_stop_func).

Note

This function can be called before the HPX runtime is initialized.

Returns

The currently installed error handler function.

threads::policies::callback_notifier::on_error_type get_thread_on_error_func()#

Retrieve the currently installed error handler function. This is a function that will be called by HPX for each newly created thread that is made known to the runtime. HPX stores exactly one such function reference, thus the caller needs to make sure any newly registered error function chains into the previous one (see register_thread_on_error_func).

Note

This function can be called before the HPX runtime is initialized.

Returns

The currently installed error handler function.

threads::policies::callback_notifier::on_startstop_type register_thread_on_start_func(threads::policies::callback_notifier::on_startstop_type &&f)#

Set the currently installed start handler function. This is a function that will be called by HPX for each newly created thread that is made known to the runtime. HPX stores exactly one such function reference, thus the caller needs to make sure any newly registered start function chains into the previous one (see get_thread_on_start_func).

Note

This function can be called before the HPX runtime is initialized.

Parameters

f – The function to install as the new start handler.

Returns

The previously registered function of this category. It is the user’s responsibility to call that function if the callback is invoked by HPX.

threads::policies::callback_notifier::on_startstop_type register_thread_on_stop_func(threads::policies::callback_notifier::on_startstop_type &&f)#

Set the currently installed stop handler function. This is a function that will be called by HPX for each newly created thread that is made known to the runtime. HPX stores exactly one such function reference, thus the caller needs to make sure any newly registered stop function chains into the previous one (see get_thread_on_stop_func).

Note

This function can be called before the HPX runtime is initialized.

Parameters

f – The function to install as the new stop handler.

Returns

The previously registered function of this category. It is the user’s responsibility to call that function if the callback is invoked by HPX.

threads::policies::callback_notifier::on_error_type register_thread_on_error_func(threads::policies::callback_notifier::on_error_type &&f)#

Set the currently installed error handler function. This is a function that will be called by HPX for each newly created thread that is made known to the runtime. HPX stores exactly one such function reference, thus the caller needs to make sure any newly registered error function chains into the previous one (see get_thread_on_error_func).

Note

This function can be called before the HPX runtime is initialized.

Parameters

f – The function to install as the new error handler.

Returns

The previously registered function of this category. It is the user’s responsibility to call that function if the callback is invoked by HPX.