![]()  | 
hpx::parallel::v2::async_task_region
// In header: <hpx/parallel/task_region.hpp> template<typename F> hpx::future< void > async_task_region(F && f);
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 once the returned future has become ready. A call to task_region may return on a different thread than that on which it was called.
![]()  | 
Note | 
|---|---|
It is expected (but not mandated) that f will (directly or indirectly) call tr.run(callable_object).  | 
Parameters:  | 
  | 
||
Template Parameters:  | 
  | 
||
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. |