folly::fibers::addTasks

addTasks overloads

Synopses

Declared in <folly/fibers/AddTasks.h>

Schedules several tasks and immediately returns an iterator, that allow one to traverse tasks in the order of their completion. All results and exceptions thrown are stored alongside with the task id and are accessible via iterator.

template<class InputIterator>
TaskIterator<std::invoke_result_t<std::iterator_traits<InputIterator>::value_type>>
addTasks(
    InputIterator first,
    InputIterator last);
» more...

Grants addTasks access to construct and populate the iterator.

template<class InputIterator>
TaskIterator<std::invoke_result_t<std::iterator_traits<InputIterator>::value_type>>
addTasks(
    InputIterator first,
    InputIterator last);
» more...

Return Value

movable, non-copyable iterator

Parameters

NameDescription
firstBeginning of the range of tasks to be scheduled
lastEnd of the range of tasks to be scheduled