proxygen
helpers.h File Reference
#include <atomic>
#include <tuple>
#include <utility>
#include <folly/Portability.h>
#include <folly/Try.h>
#include <folly/functional/Invoke.h>
#include <folly/futures/Future.h>
#include <folly/futures/Promise.h>

Go to the source code of this file.

Namespaces

 folly
 —— Concurrent Priority Queue Implementation ——
 
 folly::futures
 

Typedefs

template<typename F , typename T , typename ItT >
using folly::MaybeTryArg = typename std::conditional< is_invocable< F, T &&, Try< ItT > && >::value, Try< ItT >, ItT >::type
 

Functions

Future< Unit > folly::futures::sleep (Duration dur, Timekeeper *tk)
 
template<class It , class F , class ItT , class Result >
std::vector< Future< Result > > folly::futures::map (It first, It last, F func)
 
template<class It , class F , class ItT , class Result >
std::vector< Future< Result > > folly::futures::map (Executor &exec, It first, It last, F func)
 
template<class Collection , class F >
auto folly::futures::map (Collection &&c, F &&func) -> decltype(map(c.begin(), c.end(), func))
 
template<class Collection , class F >
auto folly::futures::map (Executor &exec, Collection &&c, F &&func) -> decltype(map(exec, c.begin(), c.end(), func))
 
template<class T >
SemiFuture< typename std::decay< T >::typefolly::makeSemiFuture (T &&t)
 
SemiFuture< Unit > folly::makeSemiFuture ()
 
template<class F >
std::enable_if< isFutureOrSemiFuture< invoke_result_t< F > >::value, SemiFuture< typename invoke_result_t< F >::value_type > >::type folly::makeSemiFutureWith (F &&func)
 
template<class F >
std::enable_if< !(isFutureOrSemiFuture< invoke_result_t< F >>::value), SemiFuture< typename lift_unit< invoke_result_t< F > >::type > >::type folly::makeSemiFutureWith (F &&func)
 
template<class T >
SemiFuture< Tfolly::makeSemiFuture (std::exception_ptr const &e)
 
template<class T >
SemiFuture< Tfolly::makeSemiFuture (exception_wrapper ew)
 Make a failed SemiFuture from an exception_wrapper. More...
 
template<class T , class E >
std::enable_if< std::is_base_of< std::exception, E >::value, SemiFuture< T > >::type folly::makeSemiFuture (E const &e)
 
template<class T >
SemiFuture< Tfolly::makeSemiFuture (Try< T > t)
 
template<class T >
Future< typename std::decay< T >::typefolly::makeFuture (T &&t)
 
Future< Unit > folly::makeFuture ()
 
template<class F >
std::enable_if< isFuture< invoke_result_t< F > >::value, invoke_result_t< F > >::type folly::makeFutureWith (F &&func)
 
template<class F >
std::enable_if< !(isFuture< invoke_result_t< F >>::value), Future< typename lift_unit< invoke_result_t< F > >::type > >::type folly::makeFutureWith (F &&func)
 
template<class T >
Future< Tfolly::makeFuture (std::exception_ptr const &e)
 
template<class T >
Future< Tfolly::makeFuture (exception_wrapper ew)
 
template<class T , class E >
std::enable_if< std::is_base_of< std::exception, E >::value, Future< T > >::type folly::makeFuture (E const &e)
 
template<class T >
Future< Tfolly::makeFuture (Try< T > t)
 
Future< Unit > folly::via (Executor *executor, int8_t priority)
 
Future< Unit > folly::via (Executor::KeepAlive<> executor, int8_t priority)
 
template<class Func >
auto folly::via (Executor *x, Func &&func) -> Future< typename isFutureOrSemiFuture< decltype(std::declval< Func >()())>::Inner >
 
template<class Func >
auto folly::via (Executor::KeepAlive<> x, Func &&func) -> Future< typename isFutureOrSemiFuture< decltype(std::declval< Func >()())>::Inner >
 
template<class InputIterator >
SemiFuture< std::vector< Try< typename std::iterator_traits< InputIterator >::value_type::value_type > > > folly::collectAllSemiFuture (InputIterator first, InputIterator last)
 
template<class Collection >
auto folly::collectAllSemiFuture (Collection &&c) -> decltype(collectAllSemiFuture(c.begin(), c.end()))
 Sugar for the most common case. More...
 
template<class InputIterator >
Future< std::vector< Try< typename std::iterator_traits< InputIterator >::value_type::value_type > > > folly::collectAll (InputIterator first, InputIterator last)
 
template<class Collection >
auto folly::collectAll (Collection &&c) -> decltype(collectAll(c.begin(), c.end()))
 
template<typename... Fs>
SemiFuture< std::tuple< Try< typename remove_cvref_t< Fs >::value_type >... > > folly::collectAllSemiFuture (Fs &&...fs)
 
template<typename... Fs>
Future< std::tuple< Try< typename remove_cvref_t< Fs >::value_type >... > > folly::collectAll (Fs &&...fs)
 
template<class InputIterator >
Future< std::vector< typename std::iterator_traits< InputIterator >::value_type::value_type > > folly::collect (InputIterator first, InputIterator last)
 
template<class Collection >
auto folly::collect (Collection &&c) -> decltype(collect(c.begin(), c.end()))
 Sugar for the most common case. More...
 
template<typename... Fs>
Future< std::tuple< typename remove_cvref_t< Fs >::value_type... > > folly::collect (Fs &&...fs)
 
template<class InputIterator >
Future< std::pair< size_t, Try< typename std::iterator_traits< InputIterator >::value_type::value_type > > > folly::collectAny (InputIterator first, InputIterator last)
 
template<class Collection >
auto folly::collectAny (Collection &&c) -> decltype(collectAny(c.begin(), c.end()))
 Sugar for the most common case. More...
 
template<class InputIterator >
SemiFuture< std::pair< size_t, typename std::iterator_traits< InputIterator >::value_type::value_type > > folly::collectAnyWithoutException (InputIterator first, InputIterator last)
 
template<class Collection >
auto folly::collectAnyWithoutException (Collection &&c) -> decltype(collectAnyWithoutException(c.begin(), c.end()))
 Sugar for the most common case. More...
 
template<class InputIterator >
SemiFuture< std::vector< std::pair< size_t, Try< typename std::iterator_traits< InputIterator >::value_type::value_type > > > > folly::collectN (InputIterator first, InputIterator last, size_t n)
 
template<class Collection >
auto folly::collectN (Collection &&c, size_t n) -> decltype(collectN(c.begin(), c.end(), n))
 Sugar for the most common case. More...
 
template<class Collection , class F , class ItT , class Result >
std::vector< Future< Result > > folly::window (Collection input, F func, size_t n)
 
template<class Collection , class F , class ItT , class Result >
std::vector< Future< Result > > folly::window (Executor *executor, Collection input, F func, size_t n)
 
template<class Collection , class F , class ItT , class Result >
std::vector< Future< Result > > folly::window (Executor::KeepAlive<> executor, Collection input, F func, size_t n)
 
template<class It , class T , class F >
Future< Tfolly::reduce (It first, It last, T &&initial, F &&func)
 
template<class Collection , class T , class F >
auto folly::reduce (Collection &&c, T &&initial, F &&func) -> decltype(reduce(c.begin(), c.end(), std::forward< T >(initial), std::forward< F >(func)))
 Sugar for the most common case. More...
 
template<class It , class T , class F >
Future< Tfolly::unorderedReduce (It first, It last, T initial, F func)
 
template<class Collection , class T , class F >
auto folly::unorderedReduce (Collection &&c, T &&initial, F &&func) -> decltype(unorderedReduce(c.begin(), c.end(), std::forward< T >(initial), std::forward< F >(func)))
 Sugar for the most common case. More...