HPX - High Performance ParalleX

PrevUpHomeNext

Function template async_task_region_final

hpx::parallel::v2::async_task_region_final

Synopsis

// In header: <hpx/parallel/task_region.hpp>


template<typename F> hpx::future< void > async_task_region_final(F && f);

Description

Constructs a task_region_handle, tr, and invokes the expression f(tr) on the user-provided object, f.

Postcondition: All tasks spawned from f have finished execution once the returned future has become ready. A call to task_region_final always returns on the same thread as that on which it was called.

[Note] Note

It is expected (but not mandated) that f will (directly or indirectly) call tr.run(callable_object).

Parameters:

f

The user defined function to invoke inside the task_region. Given an lvalue tr of type task_region_handle, the expression, (void)f(tr), shall be well-formed.

Template Parameters:

F

The type of the user defined function to invoke inside the task_region (deduced). F shall be MoveConstructible.

Returns:

An instance of future<void> which will become ready once all tasks spawned inside the task_region have finished executing. Any exceptions thrown during execution of the task_region or any of the spawned tasks are accessible through the returned value as well.

Throws:

An exception_list, as specified in Exception Handling.

PrevUpHomeNext