The process of invoking a global function (or a member function of an object) with the help of the associated action is called 'applying the action'. Actions can have arguments, which will be supplied while the action is applied. At the minimum, one parameter is required to apply any action - the id of the locality the associated function should be invoked on (for global functions), or the id of the component instance (for member functions). Generally, HPX provides several ways to apply an action, all of which are described in the following sections.
HPX allows the user to apply actions with a syntax
similar to the C++ standard. In fact, all action types have an overloaded
function operator allowing to synchronously apply the action. Further,
HPX implements hpx::async
,
which semantically works similar to the way std::async
works for plain C++ function.
Note | |
---|---|
The similarity of applying an action to conventional function invocations
extends even further. HPX implements |
Additionally, HPX exposes hpx::apply
and hpx::async_continue
, both of which refine
and extend the standard C++ facilities.