proxygen
Future-inl.h File Reference
#include <algorithm>
#include <cassert>
#include <chrono>
#include <thread>
#include <folly/Optional.h>
#include <folly/executors/InlineExecutor.h>
#include <folly/executors/QueuedImmediateExecutor.h>
#include <folly/futures/detail/Core.h>
#include <folly/synchronization/Baton.h>
#include <folly/fibers/Baton.h>

Go to the source code of this file.

Classes

class  folly::futures::detail::CoreCallbackState< T, F >
 
class  folly::futures::detail::DeferredExecutor
 
class  folly::futures::detail::WaitExecutor
 
struct  folly::futures::detail::WaitExecutor::Queue
 
struct  folly::futures::detail::WindowFakeVector
 
struct  folly::futures::detail::TryEquals< T >
 

Namespaces

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

Macros

#define FOLLY_FUTURE_USING_FIBER   1
 

Typedefs

typedef folly::fibers::Baton folly::futures::detail::FutureBatonType
 
template<typename R , std::size_t S>
using folly::futures::detail::detail_msvc_15_7_workaround::IfArgsSizeIs = std::enable_if_t< R::Arg::ArgsSize::value==S, int >
 

Functions

std::shared_ptr< Timekeeper > folly::detail::getTimekeeperSingleton ()
 
template<typename T , typename F >
auto folly::futures::detail::makeCoreCallbackState (Promise< T > &&p, F &&f) noexcept(noexcept(CoreCallbackState< T, F >(std::declval< Promise< T > && >(), std::declval< F && >())))
 
template<typename T , typename R , typename... Args>
auto folly::futures::detail::makeCoreCallbackState (Promise< T > &&p, R(&f)(Args...)) noexcept
 
template<typename R , typename State , typename T , IfArgsSizeIs< R, 0 > = 0>
decltype(auto) folly::futures::detail::detail_msvc_15_7_workaround::invoke (R, State &state, Try< T > &)
 
template<typename R , typename State , typename T , IfArgsSizeIs< R, 0 > = 0>
decltype(auto) folly::futures::detail::detail_msvc_15_7_workaround::tryInvoke (R, State &state, Try< T > &)
 
template<class T >
Future< Tfolly::futures::detail::chainExecutor (Executor *, Future< T > &&f)
 
template<class T >
Future< Tfolly::futures::detail::chainExecutor (Executor *e, SemiFuture< T > &&f)
 
template<class T >
SemiFuture< typename std::decay< T >::typefolly::makeSemiFuture (T &&t)
 
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< lift_unit_t< invoke_result_t< F > > > >::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)
 
SemiFuture< Unit > folly::makeSemiFuture ()
 
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 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< lift_unit_t< invoke_result_t< F > > > >::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<typename V , typename... Fs, std::size_t... Is>
FOLLY_ALWAYS_INLINE FOLLY_ATTR_VISIBILITY_HIDDEN void folly::futures::detail::foreach_ (index_sequence< Is... >, V &&v, Fs &&...fs)
 
template<typename V , typename... Fs>
FOLLY_ALWAYS_INLINE FOLLY_ATTR_VISIBILITY_HIDDEN void folly::futures::detail::foreach (V &&v, Fs &&...fs)
 
template<typename T >
DeferredExecutor * folly::futures::detail::getDeferredExecutor (SemiFuture< T > &future)
 
template<typename T >
folly::Executor::KeepAlive< DeferredExecutor > folly::futures::detail::stealDeferredExecutor (SemiFuture< T > &future)
 
template<typename T >
folly::Executor::KeepAlive< DeferredExecutor > folly::futures::detail::stealDeferredExecutor (Future< T > &)
 
template<typename... Ts>
void folly::futures::detail::stealDeferredExecutorsVariadic (std::vector< folly::Executor::KeepAlive< DeferredExecutor >> &executors, Ts &...ts)
 
template<class InputIterator >
void folly::futures::detail::stealDeferredExecutors (std::vector< folly::Executor::KeepAlive< DeferredExecutor >> &executors, InputIterator first, InputIterator last)
 
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 >
SemiFuture< std::vector< Try< typename std::iterator_traits< InputIterator >::value_type::value_type > > > folly::collectAllSemiFuture (InputIterator first, InputIterator last)
 
template<class InputIterator >
Future< std::vector< Try< typename std::iterator_traits< InputIterator >::value_type::value_type > > > folly::collectAll (InputIterator first, InputIterator last)
 
template<class InputIterator >
Future< std::vector< typename std::iterator_traits< InputIterator >::value_type::value_type > > folly::collect (InputIterator first, InputIterator last)
 
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 InputIterator >
SemiFuture< std::pair< size_t, typename std::iterator_traits< InputIterator >::value_type::value_type > > folly::collectAnyWithoutException (InputIterator first, InputIterator last)
 
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 It , class T , class F >
Future< Tfolly::reduce (It first, It last, T &&initial, F &&func)
 
template<class Collection , class F , class ItT , class Result >
std::vector< Future< Result > > folly::window (Collection input, F func, size_t n)
 
template<class F >
auto folly::window (size_t times, F func, size_t n) -> std::vector< invoke_result_t< F, size_t >>
 
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::unorderedReduce (It first, It last, T initial, F func)
 
template<class FutureType , typename T = typename FutureType::value_type>
void folly::futures::detail::waitImpl (FutureType &f)
 
template<class T >
void folly::futures::detail::convertFuture (SemiFuture< T > &&sf, Future< T > &f)
 
template<class T >
void folly::futures::detail::convertFuture (SemiFuture< T > &&sf, SemiFuture< T > &f)
 
template<class FutureType , typename T = typename FutureType::value_type>
void folly::futures::detail::waitImpl (FutureType &f, Duration dur)
 
template<class T >
void folly::futures::detail::waitViaImpl (Future< T > &f, DrivableExecutor *e)
 
template<class T , typename Rep , typename Period >
void folly::futures::detail::waitViaImpl (Future< T > &f, TimedDrivableExecutor *e, const std::chrono::duration< Rep, Period > &timeout)
 
template<class F >
Future< Unit > folly::when (bool p, F &&thunk)
 
template<class P , class F >
Future< Unit > folly::whileDo (P &&predicate, F &&thunk)
 
template<class F >
Future< Unit > folly::times (const int n, F &&thunk)
 
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)
 

Macro Definition Documentation

#define FOLLY_FUTURE_USING_FIBER   1

Definition at line 33 of file Future-inl.h.