57 class ItT =
typename std::iterator_traits<It>::value_type,
58 class Result =
typename decltype(
59 std::declval<ItT>().then(std::declval<F>()))::value_type>
70 class ItT =
typename std::iterator_traits<It>::value_type,
71 class Result =
typename decltype(
std::move(std::declval<ItT>())
72 .
via(std::declval<Executor*>())
73 .then(std::declval<F>()))::value_type>
77 template <
class Collection,
class F>
78 auto map(Collection&&
c, F&& func) -> decltype(
map(
c.begin(),
c.end(), func)) {
79 return map(
c.begin(),
c.end(), std::forward<F>(func));
83 template <
class Collection,
class F>
85 -> decltype(
map(exec,
c.begin(),
c.end(), func)) {
86 return map(exec,
c.begin(),
c.end(), std::forward<F>(func));
123 typename std::enable_if<
131 typename std::enable_if<
141 [[deprecated(
"use makeSemiFuture(exception_wrapper)")]]
SemiFuture<T> 150 template <
class T,
class E>
215 typename std::enable_if<
226 std::exception_ptr
const& e);
242 template <
class T,
class E>
278 template <
class Func>
282 template <
class Func>
301 template <
class InputIterator>
307 template <
class Collection>
313 template <
class InputIterator>
316 collectAll(InputIterator first, InputIterator last);
318 template <
class Collection>
327 template <
typename... Fs>
331 template <
typename... Fs>
337 template <
class InputIterator>
339 typename std::iterator_traits<InputIterator>::value_type::value_type>>
340 collect(InputIterator first, InputIterator last);
343 template <
class Collection>
351 template <
typename... Fs>
361 template <
class InputIterator>
365 collectAny(InputIterator first, InputIterator last);
368 template <
class Collection>
377 template <
class InputIterator>
380 typename std::iterator_traits<InputIterator>::value_type::value_type>>
384 template <
class Collection>
396 template <
class InputIterator>
400 collectN(InputIterator first, InputIterator last,
size_t n);
403 template <
class Collection>
405 -> decltype(
collectN(
c.begin(),
c.end(), n)) {
420 class ItT =
typename std::iterator_traits<
421 typename Collection::iterator>::value_type,
423 std::vector<Future<Result>>
window(Collection input, F func,
size_t n);
428 class ItT =
typename std::iterator_traits<
429 typename Collection::iterator>::value_type,
431 std::vector<Future<Result>>
437 class ItT =
typename std::iterator_traits<
438 typename Collection::iterator>::value_type,
440 std::vector<Future<Result>>
443 template <
typename F,
typename T,
typename ItT>
457 template <
class It,
class T,
class F>
461 template <
class Collection,
class T,
class F>
465 std::forward<T>(initial),
466 std::forward<F>(func))) {
468 c.begin(),
c.end(), std::forward<T>(initial), std::forward<F>(func));
474 template <
class It,
class T,
class F>
478 template <
class Collection,
class T,
class F>
483 std::forward<T>(initial),
484 std::forward<F>(func))) {
486 c.begin(),
c.end(), std::forward<T>(initial), std::forward<F>(func));
static const int8_t MID_PRI
typename invoke_result< F, Args... >::type invoke_result_t
Future< Unit > sleep(Duration dur, Timekeeper *tk)
constexpr detail::Map< Move > move
Future< T > unorderedReduce(It first, It last, T initial, F func)
SemiFuture< std::tuple< Try< typename remove_cvref_t< Fs >::value_type >... > > collectAllSemiFuture(Fs &&...fs)
—— Concurrent Priority Queue Implementation ——
SemiFuture< std::vector< std::pair< size_t, Try< typename std::iterator_traits< InputIterator >::value_type::value_type > > > > collectN(InputIterator first, InputIterator last, size_t n)
PUSHMI_INLINE_VAR constexpr __adl::get_executor_fn executor
std::vector< Future< Result > > map(It first, It last, F func)
std::vector< Future< Result > > window(Collection input, F func, size_t n)
SemiFuture< std::pair< size_t, typename std::iterator_traits< InputIterator >::value_type::value_type > > collectAnyWithoutException(InputIterator first, InputIterator last)
std::enable_if< isFutureOrSemiFuture< invoke_result_t< F > >::value, SemiFuture< typename invoke_result_t< F >::value_type > >::type makeSemiFutureWith(F &&func)
Future< std::pair< size_t, Try< typename std::iterator_traits< InputIterator >::value_type::value_type > > > collectAny(InputIterator first, InputIterator last)
Future< T > reduce(It first, It last, T &&initial, F &&func)
Future< std::tuple< Try< typename remove_cvref_t< Fs >::value_type >... > > collectAll(Fs &&...fs)
static const char *const value
Future< std::vector< typename std::iterator_traits< InputIterator >::value_type::value_type > > collect(InputIterator first, InputIterator last)
StatsClock::duration Duration
typename std::conditional< is_invocable< F, T &&, Try< ItT > && >::value, Try< ItT >, ItT >::type MaybeTryArg
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)
auto via(Executor *x, Func &&func) -> Future< typename isFutureOrSemiFuture< decltype(std::declval< Func >()())>::Inner >
Future< typename std::decay< T >::type > makeFuture(T &&t)
std::enable_if< isFuture< invoke_result_t< F > >::value, invoke_result_t< F > >::type makeFutureWith(F &&func)
SemiFuture< typename std::decay< T >::type > makeSemiFuture(T &&t)
constexpr detail::First first